home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / 311c_dif.zip / DIF311C.PCH next >
Text File  |  1992-08-09  |  93KB  |  3,132 lines

  1. *** ../orig/bind.c    Mon Jul 27 21:51:43 1992
  2. --- bind.c    Mon Jul 27 21:54:31 1992
  3. ***************
  4. *** 383,389 ****
  5.       char outseq[80];    /* output buffer for keystroke sequence */
  6.   
  7.       /* get a buffer for the binding list */
  8. !     listbuf = bfind(TEXT21, TRUE, 0);
  9.   /*           "Binding list" */
  10.       if (listbuf == NULL || bclear(listbuf) == FALSE) {
  11.           mlwrite(TEXT22);
  12. --- 383,389 ----
  13.       char outseq[80];    /* output buffer for keystroke sequence */
  14.   
  15.       /* get a buffer for the binding list */
  16. !     listbuf = bfind(TEXT21, TRUE, BFINVS);
  17.   /*           "Binding list" */
  18.       if (listbuf == NULL || bclear(listbuf) == FALSE) {
  19.           mlwrite(TEXT22);
  20. ***************
  21. *** 996,1002 ****
  22.   #if    PROTO
  23.   int setkey(KEYTAB *key, char *name)
  24.   #else
  25. ! setkey(key, type, name)
  26.   
  27.   KEYTAB *key;        /* ptr to key to set */
  28.   char *name;        /* name of function or buffer */
  29. --- 996,1002 ----
  30.   #if    PROTO
  31.   int setkey(KEYTAB *key, char *name)
  32.   #else
  33. ! setkey(key, name)
  34.   
  35.   KEYTAB *key;        /* ptr to key to set */
  36.   char *name;        /* name of function or buffer */
  37. *** ../orig/buffer.c    Mon Jul 27 21:51:43 1992
  38. --- buffer.c    Mon Jul 27 21:54:32 1992
  39. ***************
  40. *** 33,39 ****
  41.       if (!bp)
  42.           return(ABORT);
  43.   
  44. !     /* make it invisable if there is an argument */
  45.       if (f == TRUE)
  46.           bp->b_flag |= BFINVS;
  47.   
  48. --- 33,39 ----
  49.       if (!bp)
  50.           return(ABORT);
  51.   
  52. !     /* make it invisible if there is an argument */
  53.       if (f == TRUE)
  54.           bp->b_flag |= BFINVS;
  55.   
  56. ***************
  57. *** 178,183 ****
  58. --- 178,187 ----
  59.       if (bp == NULL)
  60.           return(ABORT);
  61.   
  62. +     /* make it invisible if there is an argument */
  63. +     if (f == TRUE)
  64. +         bp->b_flag |= BFINVS;
  65.       return(pop(bp));
  66.   }
  67.   
  68. ***************
  69. *** 278,284 ****
  70.   
  71.   /*    Build and popup a buffer containing the list of all buffers.
  72.       Bound to "C-X C-B". A numeric argument forces it to list
  73. !     invisable buffers as well.
  74.   */
  75.   
  76.   PASCAL NEAR listbuffers(f, n)
  77. --- 282,288 ----
  78.   
  79.   /*    Build and popup a buffer containing the list of all buffers.
  80.       Bound to "C-X C-B". A numeric argument forces it to list
  81. !     invisible buffers as well.
  82.   */
  83.   
  84.   PASCAL NEAR listbuffers(f, n)
  85. ***************
  86. *** 348,354 ****
  87.   
  88.       /* output the list of buffers */
  89.       while (bp != NULL) {
  90. !         /* skip invisable buffers if iflag is false */
  91.           if (((bp->b_flag&BFINVS) != 0) && (iflag != TRUE)) {
  92.               bp = bp->b_bufp;
  93.               continue;
  94. --- 352,358 ----
  95.   
  96.       /* output the list of buffers */
  97.       while (bp != NULL) {
  98. !         /* skip invisible buffers if iflag is false */
  99.           if (((bp->b_flag&BFINVS) != 0) && (iflag != TRUE)) {
  100.               bp = bp->b_bufp;
  101.               continue;
  102. *** ../orig/char.c    Mon Jul 27 21:51:43 1992
  103. --- char.c    Mon Jul 27 21:54:33 1992
  104. ***************
  105. *** 95,103 ****
  106.   }
  107.   
  108.   #if    PROTO
  109. ! char PASCAL NEAR upperc(char ch) /* return the upper case equivalant of a character */
  110.   #else
  111. ! char PASCAL NEAR upperc(ch)    /* return the upper case equivalant of a character */
  112.   
  113.   char ch;    /* character to get uppercase euivalant of */
  114.   #endif
  115. --- 95,103 ----
  116.   }
  117.   
  118.   #if    PROTO
  119. ! int PASCAL NEAR upperc(char ch) /* return the upper case equivalant of a character */
  120.   #else
  121. ! int PASCAL NEAR upperc(ch)    /* return the upper case equivalant of a character */
  122.   
  123.   char ch;    /* character to get uppercase euivalant of */
  124.   #endif
  125. *** ../orig/display.c    Mon Jul 27 21:51:44 1992
  126. --- display.c    Mon Jul 27 21:54:36 1992
  127. ***************
  128. *** 693,699 ****
  129.   
  130.       /* set up to scan pop up buffer */
  131.       lp = lforw(popbuf->b_linep);
  132. !     mlerase();
  133.       numlines = term.t_nrow-2;
  134.       cline = 0;
  135.   
  136. --- 693,699 ----
  137.   
  138.       /* set up to scan pop up buffer */
  139.       lp = lforw(popbuf->b_linep);
  140. ! /*    mlerase();    do we really need this? */
  141.       numlines = term.t_nrow-2;
  142.       cline = 0;
  143.   
  144. ***************
  145. *** 1024,1030 ****
  146.       register int i;        /* loop index */
  147.       register int lchar;     /* character to draw line in buffer with */
  148.       register int firstm;    /* is this the first mode? */
  149. !     char tline[NLINE];        /* buffer for part of mode line */
  150.   
  151.       /* don't bother if there is none! */
  152.       if (modeflag == FALSE)
  153. --- 1024,1031 ----
  154.       register int i;        /* loop index */
  155.       register int lchar;     /* character to draw line in buffer with */
  156.       register int firstm;    /* is this the first mode? */
  157. !     char tline[NLINE];    /* buffer for part of mode line */
  158. !     char time[6];        /* to hold current time */
  159.   
  160.       /* don't bother if there is none! */
  161.       if (modeflag == FALSE)
  162. ***************
  163. *** 1085,1090 ****
  164. --- 1086,1106 ----
  165.       strcat(tline, VERSION);
  166.       strcat(tline, " ");
  167.   
  168. +     /* display the time on the bottom most modeline if active */
  169. +     if (timeflag && wp->w_wndp == (WINDOW *)NULL) {
  170. +         /* get the current time/date string */
  171. +         getdtime(time);
  172. +         if (strcmp(time, "") != 0) {
  173. +             /* append the hour/min string */
  174. +             strcat(tline, "[");
  175. +             strcat(tline, time);
  176. +             strcat(tline, "] ");
  177. +             strcpy(lasttime, time);
  178. +         }
  179. +     }
  180.       /* are we horizontally scrolled? */
  181.       if (wp->w_fcol > 0) {
  182.           strcat(tline, "[<");
  183. ***************
  184. *** 1092,1097 ****
  185. --- 1108,1123 ----
  186.           strcat(tline, "]");
  187.       }
  188.   
  189. +     /* display the point position in buffer if on current modeline */
  190. +     if (posflag && wp == curwp) {
  191. +          strcat(tline, "L:");
  192. +          strcat(tline, int_asc(getlinenum(bp, wp->w_dotp)));
  193. +          strcat(tline, " C:");
  194. +          strcat(tline, int_asc(getccol(FALSE)));
  195. +          strcat(tline, " ");
  196. +     }
  197.       /* display the modes */
  198.       strcat(tline, "(");
  199.       firstm = TRUE;
  200. ***************
  201. *** 1166,1172 ****
  202.       }
  203.   }
  204.   
  205. ! PASCAL NEAR upmode()    /* update all the mode lines */
  206.   
  207.   {
  208.       register WINDOW *wp;
  209. --- 1192,1216 ----
  210.       }
  211.   }
  212.   
  213. ! VOID PASCAL NEAR getdtime(ts)    /* get the current display time string */
  214. ! char *ts;
  215. ! {
  216. !     char buf[80];
  217. !     strcpy(buf, timeset());
  218. !     if (strcmp(buf, errorm) == 0) {
  219. !         *ts = 0;
  220. !         return;
  221. !     }
  222. !     buf[16] = 0;
  223. !     strcpy(ts, &buf[11]);
  224. !     return;
  225. ! }
  226. ! VOID PASCAL NEAR upmode()    /* update all the mode lines */
  227.   
  228.   {
  229.       register WINDOW *wp;
  230. ***************
  231. *** 1178,1184 ****
  232.       }
  233.   }
  234.   
  235. ! PASCAL NEAR upwind()    /* force hard updates on all windows */
  236.   
  237.   {
  238.       register WINDOW *wp;
  239. --- 1222,1228 ----
  240.       }
  241.   }
  242.   
  243. ! VOID PASCAL NEAR upwind()    /* force hard updates on all windows */
  244.   
  245.   {
  246.       register WINDOW *wp;
  247. ***************
  248. *** 1213,1219 ****
  249.    * immediately; the terminal buffer is flushed via a call to the flusher.
  250.    */
  251.   
  252. ! PASCAL NEAR mlferase()
  253.   
  254.   {
  255.       register int save_discmd;
  256. --- 1257,1263 ----
  257.    * immediately; the terminal buffer is flushed via a call to the flusher.
  258.    */
  259.   
  260. ! VOID PASCAL NEAR mlferase()
  261.   
  262.   {
  263.       register int save_discmd;
  264. ***************
  265. *** 1224,1230 ****
  266.       discmd = save_discmd;;
  267.   }
  268.   
  269. ! PASCAL NEAR mlerase()
  270.   
  271.   {
  272.       int i;
  273. --- 1268,1274 ----
  274.       discmd = save_discmd;;
  275.   }
  276.   
  277. ! VOID PASCAL NEAR mlerase()
  278.   
  279.   {
  280.       int i;
  281. *** ../orig/dolock.c    Mon Jul 27 21:51:44 1992
  282. --- dolock.c    Mon Jul 27 21:54:37 1992
  283. ***************
  284. *** 53,59 ****
  285.   }
  286.   #endif
  287.   
  288. ! #if    FILOCK && (MSDOS || OS2 || SUN)
  289.   #if    OS2 || (MSDOS && MSC)
  290.   #include    <sys/types.h>
  291.   #endif
  292. --- 53,59 ----
  293.   }
  294.   #endif
  295.   
  296. ! #if    FILOCK && (MSDOS || OS2 || SUN || USG || V7 || BSD)
  297.   #if    OS2 || (MSDOS && MSC)
  298.   #include    <sys/types.h>
  299.   #endif
  300. ***************
  301. *** 71,77 ****
  302. --- 71,79 ----
  303.   #if    ZTC
  304.   extern volatile int errno;
  305.   #else
  306. + #if    MSC == 0
  307.   extern int errno;
  308. + #endif
  309.   #endif
  310.   #endif
  311.   
  312. *** ../orig/dutch.h    Mon Jul 27 21:51:44 1992
  313. --- dutch.h    Mon Jul 27 21:55:31 1992
  314. ***************
  315. *** 235,238 ****
  316.   #define    TEXT225 "[Switched to screen %s]"
  317.   #define    TEXT226    "%%Can not kill an executing buffer"
  318.   #define    TEXT227 "\n--- Press any key to Continue ---"
  319. --- 235,238 ----
  320.   #define    TEXT225 "[Switched to screen %s]"
  321.   #define    TEXT226    "%%Can not kill an executing buffer"
  322.   #define    TEXT227 "\n--- Press any key to Continue ---"
  323. ! #define TEXT228 "[Kill ring cleared]"
  324. *** ../orig/ebind.h    Mon Jul 27 21:51:44 1992
  325. --- ebind.h    Mon Jul 27 21:55:32 1992
  326. ***************
  327. *** 94,99 ****
  328. --- 94,100 ----
  329.   #endif
  330.       {CTLX|'W',        BINDFNC,    resize},
  331.       {CTLX|'X',        BINDFNC,    nextbuffer},
  332. +     {CTLX|'Y',        BINDFNC,    cycle_ring},
  333.       {CTLX|'Z',        BINDFNC,    enlargewind},
  334.       {META|CTRL|'C',     BINDFNC,    wordcount},
  335.       {META|CTRL|'E',     BINDFNC,    execproc},
  336. ***************
  337. *** 109,114 ****
  338. --- 110,116 ----
  339.       {META|CTRL|'V',     BINDFNC,    nextdown},
  340.       {META|CTRL|'W',     BINDFNC,    killpara},
  341.       {META|CTRL|'X',     BINDFNC,    execcmd},
  342. +     {META|CTRL|'Y',        BINDFNC,    clear_ring},
  343.       {META|CTRL|'Z',     BINDFNC,    nextup},
  344.       {META|' ',        BINDFNC,    setmark},
  345.       {META|'?',        BINDFNC,    help},
  346. ***************
  347. *** 142,147 ****
  348. --- 144,150 ----
  349.       {META|'V',        BINDFNC,    backpage},
  350.       {META|'W',        BINDFNC,    copyregion},
  351.       {META|'X',        BINDFNC,    namedcmd},
  352. +     {META|'Y',        BINDFNC,    yank_pop},
  353.       {META|'Z',        BINDFNC,    quickexit},
  354.       {META|CTRL|'?',        BINDFNC,    delbword},
  355.   
  356. *** ../orig/edef.h    Mon Jul 27 21:51:44 1992
  357. --- edef.h    Mon Jul 27 21:55:33 1992
  358. ***************
  359. *** 47,53 ****
  360. --- 47,56 ----
  361.   NOSHARE int DNEAR discmd = TRUE;     /* display command flag     */
  362.   NOSHARE int DNEAR disinp = TRUE;     /* display input characters    */
  363.   NOSHARE int DNEAR modeflag = TRUE;    /* display modelines flag    */
  364. + NOSHARE int DNEAR timeflag = FALSE;    /* display time            */
  365. + NOSHARE char DNEAR lasttime[6] = "";    /* last time string displayed    */
  366.   NOSHARE int DNEAR popflag = TRUE;    /* pop-up windows enabled?    */
  367. + NOSHARE int DNEAR posflag = TRUE;    /* display point position    */
  368.   NOSHARE int cpending = FALSE;        /* input character pending?    */
  369.   NOSHARE int charpending;        /* character pushed back    */
  370.   NOSHARE int DNEAR sscroll = FALSE;    /* smooth scrolling enabled flag*/
  371. ***************
  372. *** 81,90 ****
  373.       "GRAY", "LRED", "LGREEN", "LYELLOW", "LBLUE",
  374.       "LMAGENTA", "LCYAN", "WHITE"};
  375.     
  376. ! NOSHARE KILL *kbufp = NULL;        /* current kill buffer chunk pointer*/
  377. ! NOSHARE KILL *kbufh = NULL;        /* kill buffer header pointer    */
  378. ! NOSHARE    int kskip = 0;            /* # of bytes to skip in 1st kill chunk */
  379. ! NOSHARE int kused = KBLOCK;        /* # of bytes used in last kill chunk*/
  380.   NOSHARE WINDOW *swindow = NULL;     /* saved window pointer     */
  381.   NOSHARE int cryptflag = FALSE;        /* currently encrypting?    */
  382.   NOSHARE int oldcrypt = FALSE;        /* using old(broken) encryption? */
  383. --- 84,94 ----
  384.       "GRAY", "LRED", "LGREEN", "LYELLOW", "LBLUE",
  385.       "LMAGENTA", "LCYAN", "WHITE"};
  386.     
  387. ! NOSHARE int kill_index;            /* current index into kill ring */
  388. ! NOSHARE KILL *kbufp[NRING];        /* current kill buffer chunk pointer*/
  389. ! NOSHARE KILL *kbufh[NRING];        /* kill buffer header pointer    */
  390. ! NOSHARE    int kskip[NRING];        /* # of bytes to skip in 1st kill chunk */
  391. ! NOSHARE int kused[NRING];        /* # of bytes used in last kill chunk*/
  392.   NOSHARE WINDOW *swindow = NULL;     /* saved window pointer     */
  393.   NOSHARE int cryptflag = FALSE;        /* currently encrypting?    */
  394.   NOSHARE int oldcrypt = FALSE;        /* using old(broken) encryption? */
  395. ***************
  396. *** 150,158 ****
  397.   NOSHARE KEYTAB exbhook;        /* executed when exiting a buffer */
  398.   NOSHARE KEYTAB bufhook;        /* executed when entering a buffer */
  399.   
  400. ! /*    The variable patmatch holds the
  401. !     string that satisfies the search command.
  402. ! */
  403.   NOSHARE char *patmatch = NULL;
  404.   
  405.   #if    MAGIC
  406. --- 154,167 ----
  407.   NOSHARE KEYTAB exbhook;        /* executed when exiting a buffer */
  408.   NOSHARE KEYTAB bufhook;        /* executed when entering a buffer */
  409.   
  410. ! /* The variables matchline and matchoff hold the line
  411. !  * and offset position of the *start* of the match.
  412. !  * The variable patmatch holds the string that satisfies
  413. !  * the search command.
  414. !  */
  415. ! NOSHARE int    matchlen;
  416. ! NOSHARE int    matchoff;
  417. ! NOSHARE LINE    *matchline;
  418.   NOSHARE char *patmatch = NULL;
  419.   
  420.   #if    MAGIC
  421. ***************
  422. *** 235,241 ****
  423. --- 244,253 ----
  424.   NOSHARE extern int DNEAR discmd;    /* display command flag     */
  425.   NOSHARE extern int DNEAR disinp;    /* display input characters    */
  426.   NOSHARE extern int DNEAR modeflag;    /* display modelines flag    */
  427. + NOSHARE extern int DNEAR timeflag;    /* display time            */
  428. + NOSHARE extern char DNEAR lasttime[];    /* last time string displayed    */
  429.   NOSHARE extern int DNEAR popflag;    /* pop-up windows enabled?    */
  430. + NOSHARE extern int DNEAR posflag;    /* display point position    */
  431.   NOSHARE extern int cpending;        /* input character pending?    */
  432.   NOSHARE extern int charpending;        /* character pushed back    */
  433.   NOSHARE extern int DNEAR sscroll;    /* smooth scrolling enabled flag*/
  434. ***************
  435. *** 265,274 ****
  436.   NOSHARE extern int DNEAR quotec;    /* quote char during mlreply() */
  437.   NOSHARE extern CONST char *cname[];    /* names of colors        */
  438.     
  439. ! NOSHARE extern KILL *kbufp;        /* current kill buffer chunk pointer */
  440. ! NOSHARE extern KILL *kbufh;        /* kill buffer header pointer    */
  441. ! NOSHARE    extern int kskip;        /* # of bytes to skip in 1st kill chunk */
  442. ! NOSHARE extern int kused;        /* # of bytes used in kill buffer*/
  443.   NOSHARE extern WINDOW *swindow;     /* saved window pointer     */
  444.   NOSHARE extern int cryptflag;        /* currently encrypting?    */
  445.   NOSHARE extern int oldcrypt;        /* using old(broken) encryption? */
  446. --- 277,287 ----
  447.   NOSHARE extern int DNEAR quotec;    /* quote char during mlreply() */
  448.   NOSHARE extern CONST char *cname[];    /* names of colors        */
  449.     
  450. ! NOSHARE extern int kill_index;        /* current index into kill ring */
  451. ! NOSHARE extern KILL *kbufp[];        /* current kill buffer chunk pointer */
  452. ! NOSHARE extern KILL *kbufh[];        /* kill buffer header pointer    */
  453. ! NOSHARE    extern int kskip[];        /* # of bytes to skip in 1st kill chunk */
  454. ! NOSHARE extern int kused[];        /* # of bytes used in kill buffer*/
  455.   NOSHARE extern WINDOW *swindow;     /* saved window pointer     */
  456.   NOSHARE extern int cryptflag;        /* currently encrypting?    */
  457.   NOSHARE extern int oldcrypt;        /* using old(broken) encryption? */
  458. ***************
  459. *** 334,339 ****
  460. --- 347,355 ----
  461.   NOSHARE extern KEYTAB exbhook;        /* executed when exiting a buffer */
  462.   NOSHARE extern KEYTAB bufhook;        /* executed when entering a buffer */
  463.   
  464. + NOSHARE extern int matchlen;
  465. + NOSHARE extern int matchoff;
  466. + NOSHARE extern LINE *matchline;
  467.   NOSHARE extern char *patmatch;
  468.   
  469.   #if    MAGIC
  470. *** ../orig/efunc.h    Mon Jul 27 21:51:45 1992
  471. --- efunc.h    Mon Jul 27 21:55:34 1992
  472. ***************
  473. *** 45,53 ****
  474. --- 45,55 ----
  475.       {"count-words",            wordcount},
  476.       {"ctlx-prefix",            cex},
  477.       {"cycle-screens",        cycle_screens},
  478. +     {"cycle-ring",            cycle_ring},
  479.       {"delete-blank-lines",        deblank},
  480.       {"delete-buffer",        killbuffer},
  481.       {"delete-global-mode",        delgmode},
  482. +     {"delete-kill-ring",        clear_ring},
  483.       {"delete-mode",            delmode},
  484.       {"delete-next-character",    forwdel},
  485.       {"delete-next-word",        delfword},
  486. ***************
  487. *** 241,246 ****
  488. --- 243,249 ----
  489.       {"write-file",            filewrite},
  490.       {"write-message",        writemsg},
  491.       {"yank",            yank},
  492. +     {"yank-pop",            yank_pop},
  493.   
  494.       {"",            NULL}
  495.   };
  496. *** ../orig/english.h    Mon Jul 27 21:51:45 1992
  497. --- english.h    Mon Jul 27 21:55:35 1992
  498. ***************
  499. *** 230,233 ****
  500. --- 230,234 ----
  501.   #define    TEXT224 "%%Row origin out of range"
  502.   #define    TEXT225 "[Switched to screen %s]"
  503.   #define    TEXT226    "%%Can not kill an executing buffer"
  504. + #define TEXT228 "[Kill ring cleared]"
  505.   #define    TEXT227 "\n--- Press any key to Continue ---"
  506. *** ../orig/epath.h    Mon Jul 27 21:51:45 1992
  507. --- epath.h    Mon Jul 27 21:55:35 1992
  508. ***************
  509. *** 12,21 ****
  510.       ".emacsrc",
  511.       "emacs.hlp",
  512.       "",
  513. !     "sys:c/",
  514. !     "sys:t/",
  515. !     "sys:s/",
  516. !     "c:/",
  517.       ":t/",
  518.       ":s/"
  519.   };
  520. --- 12,18 ----
  521.       ".emacsrc",
  522.       "emacs.hlp",
  523.       "",
  524. !     "c:",
  525.       ":t/",
  526.       ":s/"
  527.   };
  528. *** ../orig/eproto.h    Mon Jul 27 21:51:45 1992
  529. --- eproto.h    Mon Jul 27 21:55:37 1992
  530. ***************
  531. *** 62,69 ****
  532.   extern char *undolock(char *fname);
  533.   extern char *PASCAL NEAR regtostr(char *buf, REGION *region);
  534.   extern char PASCAL NEAR lowerc(char ch);
  535. ! extern char PASCAL NEAR upperc(char ch);
  536. ! #if    ZTC
  537.   extern int (PASCAL NEAR *PASCAL NEAR fncmatch(char *fname))(int, int);
  538.   extern int (PASCAL NEAR *PASCAL NEAR getname(char *prompt))(int, int);
  539.   #else    /* Sun (and others?) screwed up the prototyping.*/
  540. --- 62,69 ----
  541.   extern char *undolock(char *fname);
  542.   extern char *PASCAL NEAR regtostr(char *buf, REGION *region);
  543.   extern char PASCAL NEAR lowerc(char ch);
  544. ! extern int PASCAL NEAR upperc(char ch);
  545. ! #if    ZTC || TURBO
  546.   extern int (PASCAL NEAR *PASCAL NEAR fncmatch(char *fname))(int, int);
  547.   extern int (PASCAL NEAR *PASCAL NEAR getname(char *prompt))(int, int);
  548.   #else    /* Sun (and others?) screwed up the prototyping.*/
  549. ***************
  550. *** 124,131 ****
  551. --- 124,136 ----
  552.   extern int PASCAL NEAR isletter(register unsigned int ch);
  553.   extern int PASCAL NEAR islower(register unsigned int ch);
  554.   extern int PASCAL NEAR is_num(char *st);
  555. + extern int PASCAL NEAR isearch(int dir);
  556.   extern int PASCAL NEAR isupper(register unsigned int ch);
  557. + extern int PASCAL NEAR ldelnewline(void);
  558. + extern int PASCAL NEAR linstr(char *instr);
  559. + extern int PASCAL NEAR lnewline(void);
  560.   extern int PASCAL NEAR lookup_color(char *sp);
  561. + extern int PASCAL NEAR lover(char *ostr);
  562.   extern int PASCAL NEAR mceq(int bc, MC *mt);
  563.   extern int PASCAL NEAR mcscanner(int direct, int beg_or_end, int repeats);
  564.   extern int PASCAL NEAR mcstr(void);
  565. ***************
  566. *** 223,228 ****
  567. --- 228,234 ----
  568.   extern PASCAL NEAR cex(int f, int n);
  569.   extern PASCAL NEAR cinsert(void);
  570.   extern PASCAL NEAR clean(void);
  571. + extern PASCAL NEAR clear_ring(int f, int n);
  572.   extern PASCAL NEAR clrmes(int f, int n);
  573.   extern PASCAL NEAR cmdstr(int c, char *seq);
  574.   extern PASCAL NEAR copyregion(int f, int n);
  575. ***************
  576. *** 233,238 ****
  577. --- 239,245 ----
  578.   extern PASCAL NEAR ctoec(int c);
  579.   extern PASCAL NEAR ctrlg(int f, int n);
  580.   extern PASCAL NEAR cycle_screens(int f, int n);
  581. + extern PASCAL NEAR cycle_ring(int f, int n);
  582.   extern PASCAL NEAR dcline(int argc, char *argv[], int firstflag);
  583.   extern PASCAL NEAR deblank(int f, int n);
  584.   extern PASCAL NEAR debug(BUFFER *bp, char *eline, int *skipflag);
  585. ***************
  586. *** 311,320 ****
  587.   extern PASCAL NEAR inspound(void);
  588.   extern PASCAL NEAR insspace(int f, int n);
  589.   extern PASCAL NEAR inword(void);
  590. - extern PASCAL NEAR isearch(int dir);
  591.   extern PASCAL NEAR ismodeline(WINDOW *wp, int row);
  592.   extern PASCAL NEAR istring(int f, int n);
  593. ! extern PASCAL NEAR kdelete(void);
  594.   extern PASCAL NEAR killbuffer(int f, int n);
  595.   extern PASCAL NEAR killpara(int f, int n);
  596.   extern PASCAL NEAR killregion(int f, int n);
  597. --- 318,326 ----
  598.   extern PASCAL NEAR inspound(void);
  599.   extern PASCAL NEAR insspace(int f, int n);
  600.   extern PASCAL NEAR inword(void);
  601.   extern PASCAL NEAR ismodeline(WINDOW *wp, int row);
  602.   extern PASCAL NEAR istring(int f, int n);
  603. ! extern PASCAL NEAR next_kill(void);
  604.   extern PASCAL NEAR killbuffer(int f, int n);
  605.   extern PASCAL NEAR killpara(int f, int n);
  606.   extern PASCAL NEAR killregion(int f, int n);
  607. ***************
  608. *** 322,336 ****
  609.   extern PASCAL NEAR kinsert(int back, char c);
  610.   extern PASCAL NEAR lchange(register int flag);
  611.   extern PASCAL NEAR ldelete(long n, int kflag);
  612. - extern PASCAL NEAR ldelnewline(void);
  613.   extern PASCAL NEAR lfree(LINE *lp);
  614.   extern PASCAL NEAR linsert(int n, char c);
  615. - extern PASCAL NEAR linstr(char *instr);
  616.   extern PASCAL NEAR listbuffers(int f, int n);
  617.   extern PASCAL NEAR list_screens(int f, int n);
  618. - extern PASCAL NEAR lnewline(void);
  619.   extern PASCAL NEAR long_asc(char buf[], int width, long num);
  620. - extern PASCAL NEAR lover(char *ostr);
  621.   extern PASCAL NEAR lowerregion(int f, int n);
  622.   extern PASCAL NEAR lowerword(int f, int n);
  623.   extern PASCAL NEAR lowrite(char c);
  624. --- 328,338 ----
  625. ***************
  626. *** 340,350 ****
  627.   extern PASCAL NEAR mouse_screen(void);
  628.   extern PASCAL NEAR screenlist(int iflag);
  629.   extern PASCAL NEAR makelit(char *s);
  630. - extern VOID PASCAL NEAR mcclear(void);
  631.   extern PASCAL NEAR meexit(int status);
  632.   extern PASCAL NEAR meta(int f, int n);
  633. - extern PASCAL NEAR mlerase(void);
  634. - extern PASCAL NEAR mlferase(void);
  635.   extern PASCAL NEAR mlforce(char *s);
  636.   extern PASCAL NEAR mlout(int c);
  637.   extern PASCAL NEAR mlputf(int s);
  638. --- 342,349 ----
  639. ***************
  640. *** 392,398 ****
  641.   extern PASCAL NEAR quote(int f, int n);
  642.   extern PASCAL NEAR rdonly(void);
  643.   extern PASCAL NEAR readin(char fname[], int lockfl);
  644. - extern PASCAL NEAR reeat(int c);
  645.   extern PASCAL NEAR reform(char *para);
  646.   extern PASCAL NEAR reframe(WINDOW *wp);
  647.   extern PASCAL NEAR refresh(int f, int n);
  648. --- 391,396 ----
  649. ***************
  650. *** 403,418 ****
  651.   extern PASCAL NEAR resizm(int f, int n);
  652.   extern PASCAL NEAR resterr(void);
  653.   extern PASCAL NEAR restwnd(int f, int n);
  654. - extern VOID PASCAL NEAR rmcclear(void);
  655. - extern VOID PASCAL NEAR rvstrcpy(char *rvstr, char *str);
  656.   extern PASCAL NEAR savewnd(int f, int n);
  657.   extern PASCAL NEAR scwrite(int row, char *outstr, int forg, int bacg);
  658. - extern VOID PASCAL NEAR setbit(int bc, BITMAP cclmap);
  659.   extern PASCAL NEAR setccol(int pos);
  660.   extern PASCAL NEAR setekey(int f, int n);
  661.   extern PASCAL NEAR setfillcol(int f, int n);
  662.   extern PASCAL NEAR setgmode(int f, int n);
  663. - extern VOID PASCAL NEAR setjtable(void);
  664.   extern PASCAL NEAR setmark(int f, int n);
  665.   extern PASCAL NEAR setmod(int f, int n);
  666.   extern PASCAL NEAR setwlist(char *wclist);
  667. --- 401,412 ----
  668. ***************
  669. *** 454,464 ****
  670.   extern PASCAL NEAR updone(WINDOW *wp);
  671.   extern PASCAL NEAR updpos(void);
  672.   extern PASCAL NEAR updupd(int force);
  673. - extern PASCAL NEAR upmode(void);
  674.   extern PASCAL NEAR upperregion(int f, int n);
  675.   extern PASCAL NEAR upperword(int f, int n);
  676.   extern PASCAL NEAR upscreen(int f, int n);
  677. - extern PASCAL NEAR upwind(void);
  678.   extern PASCAL NEAR usebuffer(int f, int n);
  679.   extern PASCAL NEAR varclean(void);
  680.   extern PASCAL NEAR varinit(void);
  681. --- 448,456 ----
  682. ***************
  683. *** 475,484 ****
  684. --- 467,488 ----
  685.   extern PASCAL NEAR writemsg(int f, int n);
  686.   extern PASCAL NEAR writeout(char *fn, char *mode);
  687.   extern PASCAL NEAR yank(int f, int n);
  688. + extern PASCAL NEAR yank_pop(int f, int n);
  689.   extern PASCAL NEAR zotbuf(BUFFER *bp);
  690.   extern unsigned int PASCAL NEAR chcase(register unsigned int ch);
  691.   extern unsigned int PASCAL NEAR getckey(int mflag);
  692.   extern unsigned int PASCAL NEAR stock(char *keyname);
  693. + extern VOID PASCAL NEAR getdtime(char *ts);
  694. + extern VOID PASCAL NEAR mcclear(void);
  695. + extern VOID PASCAL NEAR mlerase(void);
  696. + extern VOID PASCAL NEAR mlferase(void);
  697. + extern VOID PASCAL NEAR reeat(int c);
  698. + extern VOID PASCAL NEAR rmcclear(void);
  699. + extern VOID PASCAL NEAR rvstrcpy(char *rvstr, char *str);
  700. + extern VOID PASCAL NEAR setbit(int bc, BITMAP cclmap);
  701. + extern VOID PASCAL NEAR setjtable(void);
  702. + extern VOID PASCAL NEAR upmode(void);
  703. + extern VOID PASCAL NEAR upwind(void);
  704.   extern WINDOW *PASCAL NEAR mousewindow(int row);
  705.   extern int PASCAL NEAR wpopup(BUFFER *popbuf);
  706.   
  707. ***************
  708. *** 549,555 ****
  709.   extern char *undolock();
  710.   extern char *PASCAL NEAR regtostr();
  711.   extern char PASCAL NEAR lowerc();
  712. ! extern char PASCAL NEAR upperc();
  713.   extern int (PASCAL NEAR *PASCAL NEAR fncmatch())();
  714.   extern int (PASCAL NEAR *PASCAL NEAR getname())();
  715.   extern int a1getc();
  716. --- 553,559 ----
  717.   extern char *undolock();
  718.   extern char *PASCAL NEAR regtostr();
  719.   extern char PASCAL NEAR lowerc();
  720. ! extern int PASCAL NEAR upperc();
  721.   extern int (PASCAL NEAR *PASCAL NEAR fncmatch())();
  722.   extern int (PASCAL NEAR *PASCAL NEAR getname())();
  723.   extern int a1getc();
  724. ***************
  725. *** 606,613 ****
  726. --- 610,622 ----
  727.   extern int PASCAL NEAR isletter();
  728.   extern int PASCAL NEAR islower();
  729.   extern int PASCAL NEAR is_num();
  730. + extern int PASCAL NEAR isearch();
  731.   extern int PASCAL NEAR isupper();
  732. + extern int PASCAL NEAR ldelnewline();
  733. + extern int PASCAL NEAR linstr();
  734. + extern int PASCAL NEAR lnewline();
  735.   extern int PASCAL NEAR lookup_color();
  736. + extern int PASCAL NEAR lover();
  737.   extern int PASCAL NEAR mceq();
  738.   extern int PASCAL NEAR mcscanner();
  739.   extern int PASCAL NEAR mcstr();
  740. ***************
  741. *** 705,710 ****
  742. --- 714,720 ----
  743.   extern PASCAL NEAR cex();
  744.   extern PASCAL NEAR cinsert();
  745.   extern PASCAL NEAR clean();
  746. + extern PASCAL NEAR clear_ring();
  747.   extern PASCAL NEAR clrmes();
  748.   extern PASCAL NEAR cmdstr();
  749.   extern PASCAL NEAR copyregion();
  750. ***************
  751. *** 715,720 ****
  752. --- 725,731 ----
  753.   extern PASCAL NEAR ctoec();
  754.   extern PASCAL NEAR ctrlg();
  755.   extern PASCAL NEAR cycle_screens();
  756. + extern PASCAL NEAR cycle_ring();
  757.   extern PASCAL NEAR dcline();
  758.   extern PASCAL NEAR deblank();
  759.   extern PASCAL NEAR debug();
  760. ***************
  761. *** 794,803 ****
  762.   extern PASCAL NEAR insspace();
  763.   extern PASCAL NEAR inword();
  764.   extern PASCAL NEAR isearch();
  765. - extern PASCAL NEAR isearch();
  766.   extern PASCAL NEAR ismodeline();
  767.   extern PASCAL NEAR istring();
  768. ! extern PASCAL NEAR kdelete();
  769.   extern PASCAL NEAR killbuffer();
  770.   extern PASCAL NEAR killpara();
  771.   extern PASCAL NEAR killregion();
  772. --- 805,813 ----
  773.   extern PASCAL NEAR insspace();
  774.   extern PASCAL NEAR inword();
  775.   extern PASCAL NEAR isearch();
  776.   extern PASCAL NEAR ismodeline();
  777.   extern PASCAL NEAR istring();
  778. ! extern PASCAL NEAR next_kill();
  779.   extern PASCAL NEAR killbuffer();
  780.   extern PASCAL NEAR killpara();
  781.   extern PASCAL NEAR killregion();
  782. ***************
  783. *** 805,819 ****
  784.   extern PASCAL NEAR kinsert();
  785.   extern PASCAL NEAR lchange();
  786.   extern PASCAL NEAR ldelete();
  787. - extern PASCAL NEAR ldelnewline();
  788.   extern PASCAL NEAR lfree();
  789.   extern PASCAL NEAR linsert();
  790. - extern PASCAL NEAR linstr();
  791.   extern PASCAL NEAR listbuffers();
  792.   extern PASCAL NEAR list_screens();
  793. - extern PASCAL NEAR lnewline();
  794.   extern PASCAL NEAR long_asc();
  795. - extern PASCAL NEAR lover();
  796.   extern PASCAL NEAR lowerregion();
  797.   extern PASCAL NEAR lowerword();
  798.   extern PASCAL NEAR lowrite();
  799. --- 815,825 ----
  800. ***************
  801. *** 823,833 ****
  802.   extern PASCAL NEAR mouse_screen();
  803.   extern PASCAL NEAR screenlist();
  804.   extern PASCAL NEAR makelit();
  805. - extern VOID PASCAL NEAR mcclear();
  806.   extern PASCAL NEAR meexit();
  807.   extern PASCAL NEAR meta();
  808. - extern PASCAL NEAR mlerase();
  809. - extern PASCAL NEAR mlferase();
  810.   extern PASCAL NEAR mlforce();
  811.   extern PASCAL NEAR mlout();
  812.   extern PASCAL NEAR mlputf();
  813. --- 829,836 ----
  814. ***************
  815. *** 875,881 ****
  816.   extern PASCAL NEAR quote();
  817.   extern PASCAL NEAR rdonly();
  818.   extern PASCAL NEAR readin();
  819. - extern PASCAL NEAR reeat();
  820.   extern PASCAL NEAR reform();
  821.   extern PASCAL NEAR reframe();
  822.   extern PASCAL NEAR refresh();
  823. --- 878,883 ----
  824. ***************
  825. *** 886,901 ****
  826.   extern PASCAL NEAR resizm();
  827.   extern PASCAL NEAR resterr();
  828.   extern PASCAL NEAR restwnd();
  829. - extern VOID PASCAL NEAR rmcclear();
  830. - extern VOID PASCAL NEAR rvstrcpy();
  831.   extern PASCAL NEAR savewnd();
  832.   extern PASCAL NEAR scwrite();
  833. - extern VOID PASCAL NEAR setbit();
  834.   extern PASCAL NEAR setccol();
  835.   extern PASCAL NEAR setekey();
  836.   extern PASCAL NEAR setfillcol();
  837.   extern PASCAL NEAR setgmode();
  838. - extern VOID PASCAL NEAR setjtable();
  839.   extern PASCAL NEAR setmark();
  840.   extern PASCAL NEAR setmod();
  841.   extern PASCAL NEAR setwlist();
  842. --- 888,899 ----
  843. ***************
  844. *** 937,947 ****
  845.   extern PASCAL NEAR updone();
  846.   extern PASCAL NEAR updpos();
  847.   extern PASCAL NEAR updupd();
  848. - extern PASCAL NEAR upmode();
  849.   extern PASCAL NEAR upperregion();
  850.   extern PASCAL NEAR upperword();
  851.   extern PASCAL NEAR upscreen();
  852. - extern PASCAL NEAR upwind();
  853.   extern PASCAL NEAR usebuffer();
  854.   extern PASCAL NEAR varclean();
  855.   extern PASCAL NEAR varinit();
  856. --- 935,943 ----
  857. ***************
  858. *** 958,967 ****
  859. --- 954,975 ----
  860.   extern PASCAL NEAR writemsg();
  861.   extern PASCAL NEAR writeout();
  862.   extern PASCAL NEAR yank();
  863. + extern PASCAL NEAR yank_pop();
  864.   extern PASCAL NEAR zotbuf();
  865.   extern unsigned int PASCAL NEAR chcase();
  866.   extern unsigned int PASCAL NEAR getckey();
  867.   extern unsigned int PASCAL NEAR stock();
  868. + extern VOID PASCAL NEAR getdtime();
  869. + extern VOID PASCAL NEAR mcclear();
  870. + extern VOID PASCAL NEAR mlerase();
  871. + extern VOID PASCAL NEAR mlferase();
  872. + extern VOID PASCAL NEAR reeat();
  873. + extern VOID PASCAL NEAR rmcclear();
  874. + extern VOID PASCAL NEAR rvstrcpy();
  875. + extern VOID PASCAL NEAR setbit();
  876. + extern VOID PASCAL NEAR setjtable();
  877. + extern VOID PASCAL NEAR upmode();
  878. + extern VOID PASCAL NEAR upwind();
  879.   extern WINDOW *PASCAL NEAR mousewindow();
  880.   extern int PASCAL NEAR wpopup();
  881.   
  882. *** estruct.h.orig    Fri Oct 25 13:39:08 1991
  883. --- estruct.h    Sun Aug  9 13:07:49 1992
  884. ***************
  885. *** 31,37 ****
  886.   */
  887.   
  888.   #define PROGNAME    "MicroEMACS"
  889. ! #define    VERSION        "3.11"
  890.   
  891.   /*    Machine/OS definitions            */
  892.   /*    [Set one of these!!]            */
  893. --- 31,37 ----
  894.   */
  895.   
  896.   #define PROGNAME    "MicroEMACS"
  897. ! #define    VERSION        "3.11c"
  898.   
  899.   /*    Machine/OS definitions            */
  900.   /*    [Set one of these!!]            */
  901. ***************
  902. *** 43,49 ****
  903.   #define FINDER    0            /* Macintosh OS         */
  904.   #define HPUX    0            /* HPUX HP 9000 minicomputer    */
  905.   #define MPE    0            /* HP MPE/XL            */
  906. ! #define MSDOS    0            /* MS-DOS            */
  907.   #define OS2    0            /* Microsoft or IBM OS/2    */
  908.   #define SMOS    0            /* Supermax UNIX System V    */
  909.   #define SUN    0            /* SUN v4.0            */
  910. --- 43,49 ----
  911.   #define FINDER    0            /* Macintosh OS         */
  912.   #define HPUX    0            /* HPUX HP 9000 minicomputer    */
  913.   #define MPE    0            /* HP MPE/XL            */
  914. ! #define MSDOS    1            /* MS-DOS            */
  915.   #define OS2    0            /* Microsoft or IBM OS/2    */
  916.   #define SMOS    0            /* Supermax UNIX System V    */
  917.   #define SUN    0            /* SUN v4.0            */
  918. ***************
  919. *** 62,68 ****
  920.   #define DTL    0    /* DataLight C v3.12 */
  921.   #define GCC    0    /* the GNU C compiler */
  922.   #define LATTICE 0    /* Lattice 2.14 through 3.0 compilers */
  923. ! #define MSC    0    /* MicroSoft C compile version 3 & 4 & 5.1 */
  924.   #define MWC    0    /* Mark Williams C */
  925.   #define TURBO    0    /* Turbo C/MSDOS */
  926.   #define UNIX    0    /* a standard UNIX compiler (cc) */
  927. --- 62,68 ----
  928.   #define DTL    0    /* DataLight C v3.12 */
  929.   #define GCC    0    /* the GNU C compiler */
  930.   #define LATTICE 0    /* Lattice 2.14 through 3.0 compilers */
  931. ! #define MSC    0    /* MicroSoft C compile version 3 & 4 & 5.1 & 6 */
  932.   #define MWC    0    /* Mark Williams C */
  933.   #define TURBO    0    /* Turbo C/MSDOS */
  934.   #define UNIX    0    /* a standard UNIX compiler (cc) */
  935. ***************
  936. *** 82,88 ****
  937.   
  938.   /*   Special keyboard/network definitions         */
  939.   
  940. ! #define ATKBD    0        /* AT-style keyboard with F11, F12 & grey keys */
  941.   #define WANGPC    0        /* WangPC - mostly escape sequences    */
  942.   #define VT100    0        /* Handle VT100 style keypad - NOT VMS.    */
  943.   #define    NOVELL    0        /* IBMPC Novell NetWare flag! */
  944. --- 82,88 ----
  945.   
  946.   /*   Special keyboard/network definitions         */
  947.   
  948. ! #define ATKBD    1        /* AT-style keyboard with F11, F12 & grey keys */
  949.   #define WANGPC    0        /* WangPC - mostly escape sequences    */
  950.   #define VT100    0        /* Handle VT100 style keypad - NOT VMS.    */
  951.   #define    NOVELL    0        /* IBMPC Novell NetWare flag! */
  952. ***************
  953. *** 103,108 ****
  954. --- 103,109 ----
  955.   #define FMR    0            /* Fujitsu FMR series driver    */
  956.   #define HP110    0            /* HP110 screen driver        */
  957.   #define HP150    0            /* HP150 screen driver        */
  958. + #define    I55    0            /* IBM PS55 DOS J4.0/V        */
  959.   #define IBMPC    0            /* IBM-PC CGA/MONO/EGA/VGA drvr    */
  960.   #define MAC    0            /* Macintosh            */
  961.   #define NEC    0            /* NEC-9801VM driver        */
  962. ***************
  963. *** 117,123 ****
  964.   
  965.   /*    Windowing system style (pick one)                */
  966.   
  967. ! #define    WINDOW_TEXT    0        /* Text mode.... simple updates    */
  968.   #define    WINDOW_XVT    0        /* using XVT/any platform    */
  969.   #define    WINDOW_MSWIN    0        /* MicroSoft Windows        */
  970.   #define    WINDOW_X    0        /* X/Unix            */
  971. --- 118,124 ----
  972.   
  973.   /*    Windowing system style (pick one)                */
  974.   
  975. ! #define    WINDOW_TEXT    1        /* Text mode.... simple updates    */
  976.   #define    WINDOW_XVT    0        /* using XVT/any platform    */
  977.   #define    WINDOW_MSWIN    0        /* MicroSoft Windows        */
  978.   #define    WINDOW_X    0        /* X/Unix            */
  979. ***************
  980. *** 146,152 ****
  981.   #define REVSTA    1    /* Status line appears in reverse video     */
  982.   #define    COLOR    1    /* color commands and windows            */
  983.   
  984. ! #define FILOCK    1    /* file locking under unix BSD 4.2        */
  985.   #define    ISRCH    1    /* Incremental searches like ITS EMACS        */
  986.   #define    FLABEL    1    /* function key label code [HP150]        */
  987.   #define    CRYPT    1    /* file encryption enabled?            */
  988. --- 147,153 ----
  989.   #define REVSTA    1    /* Status line appears in reverse video     */
  990.   #define    COLOR    1    /* color commands and windows            */
  991.   
  992. ! #define FILOCK    0    /* file locking under unix BSD 4.2        */
  993.   #define    ISRCH    1    /* Incremental searches like ITS EMACS        */
  994.   #define    FLABEL    1    /* function key label code [HP150]        */
  995.   #define    CRYPT    1    /* file encryption enabled?            */
  996. ***************
  997. *** 153,159 ****
  998.   #define MAGIC    1    /* include regular expression matching?        */
  999.   #define MOUSE    1     /* Include routines for mouse actions        */
  1000.   #define    NOISY    1    /* Use a fancy BELL if it exists        */
  1001. ! #define CTAGS    0    /* include vi-like tagging?            */
  1002.   #define    SPEECH    0    /* spoken EMACS, for the sight impared [not ready] */
  1003.   #define    VARARG    1    /* use varargs.h for mlwrite()            */
  1004.   
  1005. --- 154,160 ----
  1006.   #define MAGIC    1    /* include regular expression matching?        */
  1007.   #define MOUSE    1     /* Include routines for mouse actions        */
  1008.   #define    NOISY    1    /* Use a fancy BELL if it exists        */
  1009. ! #define CTAGS    1    /* include vi-like tagging?            */
  1010.   #define    SPEECH    0    /* spoken EMACS, for the sight impared [not ready] */
  1011.   #define    VARARG    1    /* use varargs.h for mlwrite()            */
  1012.   
  1013. ***************
  1014. *** 174,180 ****
  1015.   #define    VOID
  1016.   #define NOSHARE $low32k $align(1)   /* attempt to optimize read/write vars. */
  1017.   #else
  1018. ! #ifdef    __STDC__
  1019.   #define    CONST    const
  1020.   #define    VOID    void
  1021.   #define    NOSHARE
  1022. --- 175,181 ----
  1023.   #define    VOID
  1024.   #define NOSHARE $low32k $align(1)   /* attempt to optimize read/write vars. */
  1025.   #else
  1026. ! #if    __STDC__ || MSC || TURBO || DTL || GCC || ZTC
  1027.   #define    CONST    const
  1028.   #define    VOID    void
  1029.   #define    NOSHARE
  1030. ***************
  1031. *** 193,199 ****
  1032.   
  1033.   /*    multibyte character support?    */
  1034.   
  1035. ! #if    NEC || FMR
  1036.   #define    DBCS    1    /* double byte character sets enabled */
  1037.   #define    INSDEL    1    /* use insert/delete line display optimizations */
  1038.   
  1039. --- 194,200 ----
  1040.   
  1041.   /*    multibyte character support?    */
  1042.   
  1043. ! #if    NEC || FMR || I55
  1044.   #define    DBCS    1    /* double byte character sets enabled */
  1045.   #define    INSDEL    1    /* use insert/delete line display optimizations */
  1046.   
  1047. ***************
  1048. *** 213,219 ****
  1049.   #define    PROTO    0
  1050.   #endif
  1051.   
  1052. ! #if    __STDC__ && (GCC == 0)    /* if ANSI C compatible */
  1053.   #define    ETYPE    union
  1054.   #else
  1055.   #define    ETYPE    struct
  1056. --- 214,222 ----
  1057.   #define    PROTO    0
  1058.   #endif
  1059.   
  1060. ! /* Gnu can't for some reason...*/
  1061. ! #if    (__STDC__ && (GCC == 0)) || MSC || TURBO || DTL || VMS || GCC || ZTC
  1062.   #define    ETYPE    union
  1063.   #else
  1064.   #define    ETYPE    struct
  1065. ***************
  1066. *** 411,416 ****
  1067. --- 414,420 ----
  1068.   #define    NLOCKS    100            /* max # of file locks active    */
  1069.   #define    NCOLORS    16            /* number of supported colors    */
  1070.   #define    KBLOCK    250            /* sizeof kill buffer chunks    */
  1071. + #define    NRING    16            /* # of buffers in kill ring    */
  1072.   #define    NBLOCK    16            /* line block chunk size    */
  1073.   #define    NVSIZE    10            /* max #chars in a var name    */
  1074.   #define NMARKS    10            /* number of marks        */
  1075. ***************
  1076. *** 487,492 ****
  1077. --- 491,497 ----
  1078.   #define CFCPCN    0x0001            /* Last command was C-P, C-N    */
  1079.   #define CFKILL    0x0002            /* Last command was a kill    */
  1080.   #define    CFSRCH    0x0004            /* last command was a search    */
  1081. + #define CFYANK    0x0008            /* last command was a yank    */
  1082.   
  1083.   #define    SRNORM    0            /* end past, begin front    */
  1084.   #define    SRBEGIN    1            /* always at front        */
  1085. *** ../orig/eval.c    Mon Jul 27 21:51:46 1992
  1086. --- eval.c    Mon Jul 27 21:54:39 1992
  1087. ***************
  1088. *** 328,333 ****
  1089. --- 328,334 ----
  1090.           case EVFMTLEAD:    return(fmtlead);
  1091.           case EVWCHARS:    return(getwlist(result));
  1092.           case EVPOPFLAG: return(ltos(popflag));
  1093. +         case EVPOSFLAG: return(ltos(posflag));
  1094.           case EVYANKFLAG:    return(ltos(yankflag));
  1095.           case EVSCRNAME:    return(first_screen->s_screen_name);
  1096.           case EVCURWIND: return(int_asc(getcwnum()));
  1097. ***************
  1098. *** 335,340 ****
  1099. --- 336,342 ----
  1100.           case EVORGCOL:    return(int_asc(term.t_colorg));
  1101.           case EVORGROW:    return(int_asc(term.t_roworg));
  1102.           case EVDESKCLR:    return(cname[deskcolor]);
  1103. +         case EVTIMEFLAG: return(ltos(timeflag));
  1104.       }
  1105.       meexit(-12);    /* again, we should never get here */
  1106.   }
  1107. ***************
  1108. *** 363,369 ****
  1109.       static char value[NSTRING];    /* temp buffer for value */
  1110.   
  1111.       /* no kill buffer....just a null string */
  1112. !     if (kbufh == (KILL *)NULL) {
  1113.           value[0] = 0;
  1114.           return(value);
  1115.       }
  1116. --- 365,371 ----
  1117.       static char value[NSTRING];    /* temp buffer for value */
  1118.   
  1119.       /* no kill buffer....just a null string */
  1120. !     if (kbufh[kill_index] == (KILL *)NULL) {
  1121.           value[0] = 0;
  1122.           return(value);
  1123.       }
  1124. ***************
  1125. *** 373,382 ****
  1126.       size = NSTRING - 1;
  1127.   
  1128.       /* backed up characters? */
  1129. !     if (kskip > 0) {
  1130. !         kptr = kbufh;
  1131. !         sp = &(kptr->d_chunk[kskip]);
  1132. !         counter = kskip;
  1133.           while (counter++ < KBLOCK) {
  1134.               *vp++ = *sp++;
  1135.               if (--size == 0) {
  1136. --- 375,384 ----
  1137.       size = NSTRING - 1;
  1138.   
  1139.       /* backed up characters? */
  1140. !     if (kskip[kill_index] > 0) {
  1141. !         kptr = kbufh[kill_index];
  1142. !         sp = &(kptr->d_chunk[kskip[kill_index]]);
  1143. !         counter = kskip[kill_index];
  1144.           while (counter++ < KBLOCK) {
  1145.               *vp++ = *sp++;
  1146.               if (--size == 0) {
  1147. ***************
  1148. *** 386,396 ****
  1149.           }
  1150.           kptr = kptr->d_next;
  1151.       } else {
  1152. !         kptr = kbufh;
  1153.       }
  1154.   
  1155.       if (kptr != (KILL *)NULL) {
  1156. !         while (kptr != kbufp) {
  1157.               sp = kptr->d_chunk;
  1158.               for (counter = 0; counter < KBLOCK; counter++) {
  1159.                   *vp++ = *sp++;
  1160. --- 388,398 ----
  1161.           }
  1162.           kptr = kptr->d_next;
  1163.       } else {
  1164. !         kptr = kbufh[kill_index];
  1165.       }
  1166.   
  1167.       if (kptr != (KILL *)NULL) {
  1168. !         while (kptr != kbufp[kill_index]) {
  1169.               sp = kptr->d_chunk;
  1170.               for (counter = 0; counter < KBLOCK; counter++) {
  1171.                   *vp++ = *sp++;
  1172. ***************
  1173. *** 401,407 ****
  1174.               }
  1175.               kptr = kptr->d_next;
  1176.           }
  1177. !         counter = kused;
  1178.           sp = kptr->d_chunk;
  1179.           while (counter--) {
  1180.               *vp++ = *sp++;
  1181. --- 403,409 ----
  1182.               }
  1183.               kptr = kptr->d_next;
  1184.           }
  1185. !         counter = kused[kill_index];
  1186.           sp = kptr->d_chunk;
  1187.           while (counter--) {
  1188.               *vp++ = *sp++;
  1189. ***************
  1190. *** 763,768 ****
  1191. --- 765,773 ----
  1192.                   break;
  1193.           case EVPOPFLAG: popflag = stol(value);
  1194.                   break;
  1195. +         case EVPOSFLAG: posflag = stol(value);
  1196. +                 upmode();
  1197. +                 break;
  1198.           case EVYANKFLAG:    yankflag = stol(value);
  1199.                   break;
  1200.           case EVSCRNAME:    select_screen(lookup_screen(value), TRUE);
  1201. ***************
  1202. *** 782,787 ****
  1203. --- 787,795 ----
  1204.   #endif
  1205.                   }
  1206.                   break;
  1207. +         case EVTIMEFLAG: timeflag = stol(value);
  1208. +                 upmode();
  1209. +                 break;
  1210.           }
  1211.           break;
  1212.       }
  1213. ***************
  1214. *** 1264,1270 ****
  1215.       char outseq[256];    /* output buffer for keystroke sequence */
  1216.   
  1217.       /* and get a buffer for it */
  1218. !     varbuf = bfind(TEXT56, TRUE, 0);
  1219.   /*           "Variable list" */
  1220.       if (varbuf == NULL || bclear(varbuf) == FALSE) {
  1221.           mlwrite(TEXT57);
  1222. --- 1272,1278 ----
  1223.       char outseq[256];    /* output buffer for keystroke sequence */
  1224.   
  1225.       /* and get a buffer for it */
  1226. !     varbuf = bfind(TEXT56, TRUE, BFINVS);
  1227.   /*           "Variable list" */
  1228.       if (varbuf == NULL || bclear(varbuf) == FALSE) {
  1229.           mlwrite(TEXT57);
  1230. ***************
  1231. *** 1334,1340 ****
  1232.       char outseq[80];    /* output buffer for keystroke sequence */
  1233.   
  1234.       /* get a buffer for the function list */
  1235. !     fncbuf = bfind(TEXT211, TRUE, 0);
  1236.   /*           "Function list" */
  1237.       if (fncbuf == NULL || bclear(fncbuf) == FALSE) {
  1238.           mlwrite(TEXT212);
  1239. --- 1342,1348 ----
  1240.       char outseq[80];    /* output buffer for keystroke sequence */
  1241.   
  1242.       /* get a buffer for the function list */
  1243. !     fncbuf = bfind(TEXT211, TRUE, BFINVS);
  1244.   /*           "Function list" */
  1245.       if (fncbuf == NULL || bclear(fncbuf) == FALSE) {
  1246.           mlwrite(TEXT212);
  1247. *** ../orig/evar.h    Mon Jul 27 21:51:46 1992
  1248. --- evar.h    Mon Jul 27 21:55:40 1992
  1249. ***************
  1250. *** 69,74 ****
  1251. --- 69,75 ----
  1252.       "paralead",        /* paragraph leadin characters */
  1253.       "pending",        /* type ahead pending flag */
  1254.       "popflag",        /* pop-up windows active? */
  1255. +     "posflag",        /* display point position on modeline? */
  1256.       "progname",        /* returns current prog name - "MicroEMACS" */
  1257.       "ram",            /* ram in use by malloc */
  1258.       "readhook",        /* read file execution hook */
  1259. ***************
  1260. *** 87,92 ****
  1261. --- 88,94 ----
  1262.       "sterm",        /* search terminator character */
  1263.       "target",        /* target for line moves */
  1264.       "time",            /* date and time */
  1265. +     "timeflag",        /* display time? */
  1266.       "tpause",        /* length to pause for paren matching */
  1267.       "version",        /* current version number */
  1268.       "wchars",        /* set of characters legal in words */
  1269. ***************
  1270. *** 151,183 ****
  1271.   #define    EVPARALEAD    46
  1272.   #define EVPENDING       47
  1273.   #define    EVPOPFLAG    48
  1274. ! #define EVPROGNAME      49
  1275. ! #define EVRAM           50
  1276. ! #define EVREADHK        51
  1277. ! #define    EVREGION    52
  1278. ! #define EVREPLACE       53
  1279. ! #define EVRVAL          54
  1280. ! #define EVSCRNAME    55
  1281. ! #define EVSEARCH        56
  1282. ! #define EVSEARCHPNT    57
  1283. ! #define EVSEED          58
  1284. ! #define EVSOFTTAB    59
  1285. ! #define EVSRES          60
  1286. ! #define EVSSAVE         61
  1287. ! #define EVSSCROLL    62
  1288. ! #define EVSTATUS    63
  1289. ! #define EVSTERM     64
  1290. ! #define EVTARGET    65
  1291. ! #define EVTIME        66
  1292. ! #define EVTPAUSE    67
  1293. ! #define EVVERSION    68
  1294. ! #define    EVWCHARS    69
  1295. ! #define EVWLINE     70
  1296. ! #define EVWRAPHK    71
  1297. ! #define    EVWRITEHK    72
  1298. ! #define EVXPOS        73
  1299. ! #define    EVYANKFLAG    74
  1300. ! #define EVYPOS        75
  1301.   
  1302.   /*    list of recognized user functions    */
  1303.   
  1304. --- 153,187 ----
  1305.   #define    EVPARALEAD    46
  1306.   #define EVPENDING       47
  1307.   #define    EVPOPFLAG    48
  1308. ! #define    EVPOSFLAG    49
  1309. ! #define EVPROGNAME      50
  1310. ! #define EVRAM           51
  1311. ! #define EVREADHK        52
  1312. ! #define    EVREGION    53
  1313. ! #define EVREPLACE       54
  1314. ! #define EVRVAL          55
  1315. ! #define EVSCRNAME    56
  1316. ! #define EVSEARCH        57
  1317. ! #define EVSEARCHPNT    58
  1318. ! #define EVSEED          59
  1319. ! #define EVSOFTTAB    60
  1320. ! #define EVSRES          61
  1321. ! #define EVSSAVE         62
  1322. ! #define EVSSCROLL    63
  1323. ! #define EVSTATUS    64
  1324. ! #define EVSTERM     65
  1325. ! #define EVTARGET    66
  1326. ! #define EVTIME        67
  1327. ! #define EVTIMEFLAG    68
  1328. ! #define EVTPAUSE    69
  1329. ! #define EVVERSION    70
  1330. ! #define    EVWCHARS    71
  1331. ! #define EVWLINE     72
  1332. ! #define EVWRAPHK    73
  1333. ! #define    EVWRITEHK    74
  1334. ! #define EVXPOS        75
  1335. ! #define    EVYANKFLAG    76
  1336. ! #define EVYPOS        77
  1337.   
  1338.   /*    list of recognized user functions    */
  1339.   
  1340. *** ../orig/file.c    Mon Jul 27 21:51:47 1992
  1341. --- file.c    Mon Jul 27 22:10:30 1992
  1342. ***************
  1343. *** 568,574 ****
  1344.       int sflag;        /* are we safe saving? */
  1345.       char tname[NSTRING];    /* temporary file name */
  1346.       char buf[NSTRING];    /* message buffer */
  1347. ! #if    BSD | SUN | V7
  1348.       struct stat st;        /* we need info about the file permisions */
  1349.   #endif
  1350.   
  1351. --- 568,574 ----
  1352.       int sflag;        /* are we safe saving? */
  1353.       char tname[NSTRING];    /* temporary file name */
  1354.       char buf[NSTRING];    /* message buffer */
  1355. ! #if    BSD | SUN | V7 | XENIX
  1356.       struct stat st;        /* we need info about the file permisions */
  1357.   #endif
  1358.   
  1359. ***************
  1360. *** 648,654 ****
  1361.               strcat(buf, "s");
  1362.   
  1363.           if (sflag) {
  1364. ! #if    BSD | SUN | V7
  1365.               /* get the permisions on the original file */
  1366.               stat(fn, &st);
  1367.   #endif
  1368. --- 648,654 ----
  1369.               strcat(buf, "s");
  1370.   
  1371.           if (sflag) {
  1372. ! #if    BSD | SUN | V7 | XENIX
  1373.               /* get the permisions on the original file */
  1374.               stat(fn, &st);
  1375.   #endif
  1376. ***************
  1377. *** 655,662 ****
  1378.               /* erase original file */
  1379.               /* rename temporary file to original name */
  1380.               if (unlink(fn) == 0 && rename(tname, fn) == 0) {
  1381. ! #if    BSD | SUN | V7
  1382.                   chmod(fn, (int)st.st_uid, (int)st.st_gid);
  1383.                   chmod(fn, (int)st.st_mode);
  1384.   #else
  1385.                   ;
  1386. --- 655,664 ----
  1387.               /* erase original file */
  1388.               /* rename temporary file to original name */
  1389.               if (unlink(fn) == 0 && rename(tname, fn) == 0) {
  1390. ! #if    BSD | SUN | V7 | XENIX
  1391. ! #if    !(PC_BSD)
  1392.                   chmod(fn, (int)st.st_uid, (int)st.st_gid);
  1393. + #endif /* !(PC_BSD) */
  1394.                   chmod(fn, (int)st.st_mode);
  1395.   #else
  1396.                   ;
  1397. ***************
  1398. *** 840,846 ****
  1399.           return(status);
  1400.   
  1401.       /* get a buffer for the file list */
  1402. !     dirbuf = bfind("File List", TRUE, 0);
  1403.       if (dirbuf == NULL || bclear(dirbuf) == FALSE) {
  1404.           mlwrite("Can not display file list");
  1405.   /*            "Can not display function list" */
  1406. --- 842,848 ----
  1407.           return(status);
  1408.   
  1409.       /* get a buffer for the file list */
  1410. !     dirbuf = bfind("File List", TRUE, BFINVS);
  1411.       if (dirbuf == NULL || bclear(dirbuf) == FALSE) {
  1412.           mlwrite("Can not display file list");
  1413.   /*            "Can not display function list" */
  1414. *** ../orig/french.h    Mon Jul 27 21:51:48 1992
  1415. --- french.h    Mon Jul 27 21:55:40 1992
  1416. ***************
  1417. *** 270,273 ****
  1418.   #define    TEXT225 "[Switched to screen %s]"
  1419.   #define    TEXT226    "%%Can not kill an executing buffer"
  1420.   #define    TEXT227 "\n--- Press any key to Continue ---"
  1421. --- 270,273 ----
  1422.   #define    TEXT225 "[Switched to screen %s]"
  1423.   #define    TEXT226    "%%Can not kill an executing buffer"
  1424.   #define    TEXT227 "\n--- Press any key to Continue ---"
  1425. ! #define TEXT228 "[List du ratures vide']"
  1426. *** ../orig/german.h    Mon Jul 27 21:51:48 1992
  1427. --- german.h    Mon Jul 27 21:55:41 1992
  1428. ***************
  1429. *** 292,295 ****
  1430. --- 292,296 ----
  1431.   #define    TEXT225 "[Switched to screen %s]"
  1432.   #define    TEXT226    "%%Can not kill an executing buffer"
  1433.   #define    TEXT227 "\n--- Press any key to Continue ---"
  1434. + #define TEXT228 "[Kill ring cleared]"
  1435.   
  1436. *** ../orig/history.c    Mon Jul 27 21:51:49 1992
  1437. --- history.c    Mon Jul 27 21:54:44 1992
  1438. ***************
  1439. *** 1741,1746 ****
  1440. --- 1741,1794 ----
  1441.    *      than the execute-macro-<n> commands which I am trying to phase out.
  1442.    *    31-oct-91
  1443.    *    [RELEASED version 3.11 for general distribution]
  1444. +  *    31-Oct-91 Ken Cornetet
  1445. +  *    - extra parameter in non-proto version of setkey() deleted
  1446. +  *    - Microport V/AT modifications. An "ndir" package is needed
  1447. +  *      (contact Ken at <kenc@ezelmo.UUCP> for this)
  1448. +  *      Also, set terminfo string "is2" on closing tty
  1449. +  *    19-Nov-91 Pete Dunlap
  1450. +  *    - changed initializers for search path for the AMIGA to more closely
  1451. +  *      resemble reality, don't need to put boot disk in on each search
  1452. +  *    - added XENIX to the list of files to preserve permisions
  1453. +  *    19-Nov-91 Daniel Lawrence
  1454. +  *    - added two missing zeroes in the TERM structure for the HP150
  1455. +  *    21-nov-91
  1456. +  *    - added $timeflag, when TRUE displays hour/minute of last keystroke
  1457. +  *      on bottom modeline
  1458. +  *    - ? in file/buffer/command name completion brings up a completion
  1459. +  *      list as will a partial completion attempt.
  1460. +  *    - changed all lists/description popups to BFINVS invisible buffers
  1461. +  *    - changed name of buffer list buffer from [List] to [Buffers]
  1462. +  *    - added some missing systems to the list for dolock() in dolock.c
  1463. +  *      (notable USG, V7 and BSD)
  1464. +  *    23-nov-91
  1465. +  *    [RELEASED update 3.11a via BBS]
  1466. +  *    24-dec-91
  1467. +  *    - added new commands yank-pop (M-Y), delete-kill-ring (M-^Y),
  1468. +  *      and cycle-ring (^X-Y) to handle a ring of kill buffers. More
  1469. +  *      info on their use in the reference manual.
  1470. +  *    - changed version to 3.11b
  1471. +  *    5-jan-92 John M. Gamble
  1472. +  *    - pop-buffer, with a numeric argument, now behaves like select-buffer
  1473. +  *      by making that buffer INVISIBLE.
  1474. +  *    - Reverse search groups handled more sensibly, smaller code.
  1475. +  *    7-jan-92 Walter Warniaha/via BBS
  1476. +  *    - made some fixes to help MSC under MSDOS work properly. Set default
  1477. +  *      stack to 20K, fixed some variable conflicts.
  1478. +  *    15-jan-92
  1479. +  *    - added $posflag to show point position on current modeline as
  1480. +  *      suggested by Brian Casiello, defaults to on.
  1481. +  *    19-jan-92 John M. Gamble
  1482. +  *    - On some otherwise ANSI C compilers, __STDC__ is not 1, because we
  1483. +  *      also make use of the PASCAL modifier, which is not ANSI.  So in
  1484. +  *      ESTRUCT.H, where there is a check on __STDC__, we also list the
  1485. +  *      other ANSI C compilers.  This turns on VOID, CONST, and makes
  1486. +  *      ETYPE a union instead of a struct.
  1487. +  *    25-jan-92 John M. Gamble
  1488. +  *    - Normal Isearch exit updates the search jump tables too.
  1489. +  *    31-jan-91
  1490. +  *    - fill-paragraph on an empty buffer no longer hangs
  1491. +  *    - changed version number to 3.11c and released via BBS
  1492.    */
  1493.   
  1494.   history()
  1495. *** ../orig/hp150.c    Mon Jul 27 21:51:51 1992
  1496. --- hp150.c    Mon Jul 27 21:54:45 1992
  1497. ***************
  1498. *** 56,61 ****
  1499. --- 56,62 ----
  1500.   
  1501.   union REGS r;        /* register set for bios and dos (AGIOS) calls */
  1502.   int capslock = 0;    /* caps lock flag */
  1503. + int break_flag;        /* state of MSDOS control break processing */
  1504.   
  1505.   /*
  1506.    * Standard terminal interface dispatch table. Most of the fields point into
  1507. ***************
  1508. *** 68,73 ****
  1509. --- 69,75 ----
  1510.           NCOL,
  1511.       MARGIN,
  1512.       SCRSIZ,
  1513. +     0, 0,
  1514.       NPAUSE,
  1515.       openhp,
  1516.           closehp,
  1517. ***************
  1518. *** 428,446 ****
  1519.   PASCAL NEAR ckeyoff()    /* turn control-C trapping off */
  1520.   
  1521.   {
  1522. !     r.h.ah = 0x33;    /* ctrl-break check */
  1523. !     r.h.al = 1;    /* set the state of the ctrl-break check */
  1524. !     r.h.dl = 0;    /* turn it off */
  1525. !     intdos(&r, &r);
  1526.   }
  1527.   
  1528.   PASCAL NEAR ckeyon()    /* turn control-C trapping on */
  1529.   
  1530.   {
  1531. !     r.h.ah = 0x33;    /* ctrl-break check */
  1532. !     r.h.al = 1;    /* set the state of the ctrl-break check */
  1533. !     r.h.dl = 1;    /* turn it on */
  1534. !     intdos(&r, &r);
  1535.   }
  1536.   
  1537.   #ifdef    unsigned
  1538. --- 430,459 ----
  1539.   PASCAL NEAR ckeyoff()    /* turn control-C trapping off */
  1540.   
  1541.   {
  1542. !     /* find the current state of the control break inturrupt */
  1543. !     rg.h.ah = 0x33;    /* ctrl-break check */
  1544. !     rg.h.al = 0;    /* request the state of the ctrl-break check */
  1545. !     intdos(&rg, &rg);
  1546. !     break_flag = rg.h.dl;
  1547. !     /* set the break processing off if it is on */
  1548. !     if (break_flag == 1) {
  1549. !         rg.h.ah = 0x33;    /* ctrl-break check */
  1550. !         rg.h.al = 1;    /* set the state of the ctrl-break check */
  1551. !         rg.h.dl = 0;    /* turn it off */
  1552. !         intdos(&rg, &rg);
  1553. !     }
  1554.   }
  1555.   
  1556.   PASCAL NEAR ckeyon()    /* turn control-C trapping on */
  1557.   
  1558.   {
  1559. !     if (break_flag == 1) {
  1560. !         rg.h.ah = 0x33;    /* ctrl-break check */
  1561. !         rg.h.al = 1;    /* set the state of the ctrl-break check */
  1562. !         rg.h.dl = 1;    /* turn it on */
  1563. !         intdos(&rg, &rg);
  1564. !     }
  1565.   }
  1566.   
  1567.   #ifdef    unsigned
  1568. *** ../orig/ibmpc.c    Mon Jul 27 21:51:51 1992
  1569. --- ibmpc.c    Mon Jul 27 21:54:46 1992
  1570. ***************
  1571. *** 70,77 ****
  1572.   int revflag = FALSE;            /* are we currently in rev video? */
  1573.   int desk_rows;                /* number of rows on current desktop */
  1574.   int desk_cols;                /* number of cols on current desktop */
  1575.   
  1576.   PASCAL NEAR ibmmove();
  1577.   PASCAL NEAR ibmeeol();
  1578.   PASCAL NEAR ibmputc();
  1579. --- 70,77 ----
  1580.   int revflag = FALSE;            /* are we currently in rev video? */
  1581.   int desk_rows;                /* number of rows on current desktop */
  1582.   int desk_cols;                /* number of cols on current desktop */
  1583. + int break_flag;            /* state of MSDOS control break processing */
  1584.   
  1585.   PASCAL NEAR ibmmove();
  1586.   PASCAL NEAR ibmeeol();
  1587.   PASCAL NEAR ibmputc();
  1588. ***************
  1589. *** 258,264 ****
  1590. --- 258,268 ----
  1591.           rg.h.bh = 0;        /* display page zero */
  1592.           rg.x.cx = 1;        /* only one please! */
  1593.           rg.h.al = ' ';        /* character to write */
  1594. + #if    COLOR
  1595.           rg.h.bl = ((ctrans[gbcolor] << 4) | ctrans[gfcolor]);/* attribute */
  1596. + #else
  1597. +         rg.h.bl = 07;
  1598. + #endif
  1599.           int86(0x10, &rg, &rg);
  1600.           return;
  1601.       }
  1602. ***************
  1603. *** 272,278 ****
  1604. --- 276,286 ----
  1605.       rg.h.bh = 0;        /* display page zero */
  1606.       rg.x.cx = 1;        /* only one please! */
  1607.       rg.h.al = ch;        /* character to write */
  1608. + #if    COLOR
  1609.       rg.h.bl = ((ctrans[gbcolor] << 4) | ctrans[gfcolor]);    /* attribute */
  1610. + #else
  1611. +     rg.h.bl = 07;
  1612. + #endif
  1613.       int86(0x10, &rg, &rg);
  1614.   
  1615.       /* advance the cursor by 1 position */
  1616. ***************
  1617. *** 422,432 ****
  1618. --- 430,459 ----
  1619.   PASCAL NEAR ibmkopen()    /* open the keyboard */
  1620.   
  1621.   {
  1622. +     /* find the current state of the control break inturrupt */
  1623. +     rg.h.ah = 0x33;    /* ctrl-break check */
  1624. +     rg.h.al = 0;    /* request the state of the ctrl-break check */
  1625. +     intdos(&rg, &rg);
  1626. +     break_flag = rg.h.dl;
  1627. +     /* set the break processing off if it is on */
  1628. +     if (break_flag == 1) {
  1629. +         rg.h.ah = 0x33;    /* ctrl-break check */
  1630. +         rg.h.al = 1;    /* set the state of the ctrl-break check */
  1631. +         rg.h.dl = 0;    /* turn it off */
  1632. +         intdos(&rg, &rg);
  1633. +     }
  1634.   }
  1635.   
  1636.   PASCAL NEAR ibmkclose() /* close the keyboard */
  1637.   
  1638.   {
  1639. +     if (break_flag == 1) {
  1640. +         rg.h.ah = 0x33;    /* ctrl-break check */
  1641. +         rg.h.al = 1;    /* set the state of the ctrl-break check */
  1642. +         rg.h.dl = 1;    /* turn it on */
  1643. +         intdos(&rg, &rg);
  1644. +     }
  1645.   }
  1646.   
  1647.   PASCAL NEAR scinit(type) /* initialize the screen head pointers */
  1648. *** ../orig/input.c    Mon Jul 27 21:51:51 1992
  1649. --- input.c    Mon Jul 27 21:54:48 1992
  1650. ***************
  1651. *** 296,301 ****
  1652. --- 296,330 ----
  1653.               TTflush();
  1654.               if (buf[cpos - 1] == 0)
  1655.                   return(buf);
  1656. +             goto clist;
  1657. +         } else if (c == '?') {    
  1658. + clist:            /* make a completion list! */
  1659. +             switch (type) {
  1660. +                 case CMP_BUFFER:
  1661. +                     clist_buffer(buf, &cpos);
  1662. +                     break;
  1663. +                 case CMP_COMMAND:
  1664. +                     clist_command(buf, &cpos);
  1665. +                     break;
  1666. +                 case CMP_FILENAME:
  1667. +                     clist_file(buf, &cpos);
  1668. +                     break;
  1669. +             }
  1670. +             update(TRUE);
  1671. +             /* if it exists, reprompt the user */
  1672. +             if (prompt) {
  1673. +                 buf[cpos] = 0;
  1674. +                 if (type == CMP_COMMAND)
  1675. +                     mlwrite("%s%s", prompt, buf);
  1676. +                 else if (defval)
  1677. +                     mlwrite("%s[%s]: %s", prompt, defval, buf);
  1678. +                 else
  1679. +                     mlwrite("%s: %s", prompt, buf);
  1680. +             }
  1681.           } else {
  1682.               if (cpos < maxlen && c > ' ') {
  1683.                   buf[cpos++] = c;
  1684. ***************
  1685. *** 383,388 ****
  1686. --- 412,453 ----
  1687.       return;
  1688.   }
  1689.   
  1690. + /*    clist_command:    Make a completion list based on a partial name */
  1691. + clist_command(name, cpos)
  1692. + char *name;    /* command containing the current name to complete */
  1693. + int *cpos;    /* ptr to position of next character to insert */
  1694. + {
  1695. +     register NBIND *bp;    /* trial command to complete */
  1696. +     register int curbind;    /* index into the names[] array */
  1697. +     register int name_len;    /* current length of input string */
  1698. +     register BUFFER *listbuf;/* buffer to put completion list into */
  1699. +     /* get a buffer for the completion list */
  1700. +     listbuf = bfind("[Completion list]", TRUE, BFINVS);
  1701. +     if (listbuf == NULL || bclear(listbuf) == FALSE) {
  1702. +         ctrlg(FALSE, 0);
  1703. +         TTflush();
  1704. +         return;
  1705. +     }
  1706. +     name_len = *cpos;
  1707. +     /* first, we start at the first command and scan the list */
  1708. +     for (curbind = 0; curbind <= numfunc; curbind++) {
  1709. +         /* is this a match? */
  1710. +         bp = &names[curbind];
  1711. +         if (strncmp(name, bp->n_name, name_len) == 0)
  1712. +             addline(listbuf, bp->n_name);
  1713. +     }
  1714. +     wpopup(listbuf);
  1715. +     return;
  1716. + }
  1717.   /*    comp_buffer:    Attempt a completion on a buffer name    */
  1718.   
  1719.   comp_buffer(name, cpos)
  1720. ***************
  1721. *** 456,461 ****
  1722. --- 521,564 ----
  1723.       return;
  1724.   }
  1725.   
  1726. + /*    clist_buffer:    Make a completion list based on a partial buffer name */
  1727. + clist_buffer(name, cpos)
  1728. + char *name;    /* command containing the current name to complete */
  1729. + int *cpos;    /* ptr to position of next character to insert */
  1730. + {
  1731. +     register int name_len;    /* current length of input string */
  1732. +     register BUFFER *listbuf;/* buffer to put completion list into */
  1733. +     register BUFFER *bp;    /* trial buffer to complete */
  1734. +     /* get a buffer for the completion list */
  1735. +     listbuf = bfind("[Completion list]", TRUE, BFINVS);
  1736. +     if (listbuf == NULL || bclear(listbuf) == FALSE) {
  1737. +         ctrlg(FALSE, 0);
  1738. +         TTflush();
  1739. +         return;
  1740. +     }
  1741. +     /* first, we start at the first buffer and scan the list */
  1742. +     name_len = *cpos;
  1743. +     bp = bheadp;
  1744. +     while (bp) {
  1745. +         /* is this a match? */
  1746. +         if (strncmp(name, bp->b_bname, name_len) == 0)
  1747. +             addline(listbuf, bp->b_bname);
  1748. +         /* on to the next buffer */
  1749. +         bp = bp->b_bufp;
  1750. +     }
  1751. +     wpopup(listbuf);
  1752. +     return;
  1753. + }
  1754.   /*    comp_file:    Attempt a completion on a file name    */
  1755.   
  1756.   comp_file(name, cpos)
  1757. ***************
  1758. *** 532,537 ****
  1759. --- 635,680 ----
  1760.   
  1761.       TTflush();
  1762.   
  1763. +     return;
  1764. + }
  1765. + /*    clist_file:    Make a completion list based on a partial file name */
  1766. + clist_file(name, cpos)
  1767. + char *name;    /* command containing the current name to complete */
  1768. + int *cpos;    /* ptr to position of next character to insert */
  1769. + {
  1770. +     register int name_len;    /* current length of input string */
  1771. +     register BUFFER *listbuf;/* buffer to put completion list into */
  1772. +     register char *fname;    /* trial file to complete */
  1773. +     /* get a buffer for the completion list */
  1774. +     listbuf = bfind("[Completion list]", TRUE, BFINVS);
  1775. +     if (listbuf == NULL || bclear(listbuf) == FALSE) {
  1776. +         ctrlg(FALSE, 0);
  1777. +         TTflush();
  1778. +         return;
  1779. +     }
  1780. +     /* first, we start at the first file and scan the list */
  1781. +     name_len = *cpos;
  1782. +     name[*cpos] = 0;
  1783. +     fname = getffile(name);
  1784. +     /* first, we start at the first file and scan the list */
  1785. +     while (fname) {
  1786. +         /* is this a match? */
  1787. +         if (strncmp(name, fname, name_len) == 0)
  1788. +             addline(listbuf, fname);
  1789. +         /* on to the next file */
  1790. +         fname = getnfile();
  1791. +     }
  1792. +     wpopup(listbuf);
  1793.       return;
  1794.   }
  1795.   
  1796. *** ../orig/isearch.c    Mon Jul 27 21:51:51 1992
  1797. --- isearch.c    Mon Jul 27 21:54:49 1992
  1798. ***************
  1799. *** 47,54 ****
  1800.   static int cmd_offset;            /* Current offset into command buff */
  1801.   static int cmd_reexecute = -1;        /* > 0 if re-executing command */
  1802.   
  1803. - PASCAL NEAR reeat();    /* A local function type definition */
  1804.   /*
  1805.    * Subroutine to do incremental reverse search.  It actually uses the
  1806.    * same code as the normal incremental search, as both can go both ways.
  1807. --- 47,52 ----
  1808. ***************
  1809. *** 114,123 ****
  1810.    * will stall until the pattern string is edited back into something that
  1811.    * exists (or until the search is aborted).
  1812.    */
  1813. ! PASCAL NEAR isearch(dir)
  1814.   int    dir;
  1815.   {
  1816.       int            status;        /* Search status */
  1817.       int            col;        /* prompt column */
  1818. --- 112,119 ----
  1819.    * will stall until the pattern string is edited back into something that
  1820.    * exists (or until the search is aborted).
  1821.    */
  1822. ! int PASCAL NEAR isearch(dir)
  1823.   int    dir;
  1824.   {
  1825.       int            status;        /* Search status */
  1826.       int            col;        /* prompt column */
  1827. ***************
  1828. *** 162,169 ****
  1829.        */
  1830.       c = ectoc(expc = get_char());
  1831.   
  1832. !     if (expc == sterm)            /* Want to quit searching?    */
  1833.           return(TRUE);            /* Quit searching now          */
  1834.   
  1835.       if (expc == abortc)            /* If abort search request    */
  1836.           break;                /* Quit searching          */
  1837. --- 158,167 ----
  1838.        */
  1839.       c = ectoc(expc = get_char());
  1840.   
  1841. !     if (expc == sterm) {            /* Want to quit searching?    */
  1842. !         setjtable();            /* Update the jump tables     */
  1843.           return(TRUE);            /* Quit searching now          */
  1844. +     }
  1845.   
  1846.       if (expc == abortc)            /* If abort search request    */
  1847.           break;                /* Quit searching          */
  1848. ***************
  1849. *** 446,452 ****
  1850.       return(c);                /* and return the last char          */
  1851.   }
  1852.   
  1853. ! PASCAL NEAR reeat(c)
  1854.   int    c;
  1855.   {
  1856.       if (eaten_char != -1)        /* If we've already been here          */
  1857. --- 444,450 ----
  1858.       return(c);                /* and return the last char          */
  1859.   }
  1860.   
  1861. ! VOID PASCAL NEAR reeat(c)
  1862.   int    c;
  1863.   {
  1864.       if (eaten_char != -1)        /* If we've already been here          */
  1865. ***************
  1866. *** 456,462 ****
  1867.       term.t_getchar = uneat;        /* Replace it with ours              */
  1868.   }
  1869.   #else
  1870. ! PASCAL NEAR isearch(dir)
  1871.   
  1872.   int dir;
  1873.   
  1874. --- 454,460 ----
  1875.       term.t_getchar = uneat;        /* Replace it with ours              */
  1876.   }
  1877.   #else
  1878. ! int PASCAL NEAR isearch(dir)
  1879.   
  1880.   int dir;
  1881.   
  1882. *** ../orig/japan.h    Mon Jul 27 21:51:52 1992
  1883. --- japan.h    Mon Jul 27 21:55:42 1992
  1884. ***************
  1885. *** 232,235 ****
  1886.   #define    TEXT225 "[Switched to screen %s]"
  1887.   #define    TEXT226    "%%Can not kill an executing buffer"
  1888.   #define    TEXT227 "\n--- Press any key to Continue ---"
  1889. --- 232,235 ----
  1890.   #define    TEXT225 "[Switched to screen %s]"
  1891.   #define    TEXT226    "%%Can not kill an executing buffer"
  1892.   #define    TEXT227 "\n--- Press any key to Continue ---"
  1893. ! #define TEXT228 "[Kill ring cleared]"
  1894. *** ../orig/latin.h    Mon Jul 27 21:51:52 1992
  1895. --- latin.h    Mon Jul 27 21:55:43 1992
  1896. ***************
  1897. *** 228,231 ****
  1898. --- 228,232 ----
  1899.   #define    TEXT224 "%%Row origin out of range"
  1900.   #define    TEXT225 "[Switched to screen %s]"
  1901.   #define    TEXT226    "%%Can not kill an executing buffer"
  1902. + #define TEXT228 "[Kill ring cleared]"
  1903.   #define    TEXT227 "\n--- Press any key to Continue ---"
  1904. *** ../orig/line.c    Mon Jul 27 21:51:52 1992
  1905. --- line.c    Mon Jul 27 21:54:52 1992
  1906. ***************
  1907. *** 19,24 ****
  1908. --- 19,26 ----
  1909.   
  1910.   #define    BSIZE(a)    (a + NBLOCK - 1) & (~(NBLOCK - 1))
  1911.   
  1912. + static long last_size = -1L;    /* last # of bytes yanked */
  1913.   /*
  1914.    * This routine allocates a block of memory large enough to hold a LINE
  1915.    * containing "used" characters. Return a pointer to the new block, or
  1916. ***************
  1917. *** 151,157 ****
  1918.    * linstr -- Insert a string at the current point
  1919.    */
  1920.   
  1921. ! PASCAL NEAR linstr(instr)
  1922.   char    *instr;
  1923.   {
  1924.       register int status;
  1925. --- 153,159 ----
  1926.    * linstr -- Insert a string at the current point
  1927.    */
  1928.   
  1929. ! int PASCAL NEAR linstr(instr)
  1930.   char    *instr;
  1931.   {
  1932.       register int status;
  1933. ***************
  1934. *** 319,325 ****
  1935.    * lover -- Overwrite a string at the current point
  1936.    */
  1937.   
  1938. ! PASCAL NEAR lover(ostr)
  1939.   
  1940.   char    *ostr;
  1941.   
  1942. --- 321,327 ----
  1943.    * lover -- Overwrite a string at the current point
  1944.    */
  1945.   
  1946. ! int PASCAL NEAR lover(ostr)
  1947.   
  1948.   char    *ostr;
  1949.   
  1950. ***************
  1951. *** 349,355 ****
  1952.    * update of dot and mark is a bit easier then in the above case, because the
  1953.    * split forces more updating.
  1954.    */
  1955. ! PASCAL NEAR lnewline()
  1956.   {
  1957.       register char    *cp1;
  1958.       register char    *cp2;
  1959. --- 351,357 ----
  1960.    * update of dot and mark is a bit easier then in the above case, because the
  1961.    * split forces more updating.
  1962.    */
  1963. ! int PASCAL NEAR lnewline()
  1964.   {
  1965.       register char    *cp1;
  1966.       register char    *cp2;
  1967. ***************
  1968. *** 693,699 ****
  1969.    * about in memory. Return FALSE on error and TRUE if all looks ok. Called by
  1970.    * "ldelete" only.
  1971.    */
  1972. ! PASCAL NEAR ldelnewline()
  1973.   {
  1974.       register char    *cp1;
  1975.       register char    *cp2;
  1976. --- 695,701 ----
  1977.    * about in memory. Return FALSE on error and TRUE if all looks ok. Called by
  1978.    * "ldelete" only.
  1979.    */
  1980. ! int PASCAL NEAR ldelnewline()
  1981.   {
  1982.       register char    *cp1;
  1983.       register char    *cp2;
  1984. ***************
  1985. *** 843,869 ****
  1986.    * new kill context is being created. The kill buffer array is released, just
  1987.    * in case the buffer has grown to immense size. No errors.
  1988.    */
  1989. ! PASCAL NEAR kdelete()
  1990.   {
  1991.       KILL *kp;    /* ptr to scan kill buffer chunk list */
  1992.   
  1993. !     if (kbufh != NULL) {
  1994.   
  1995.           /* first, delete all the chunks */
  1996. !         kbufp = kbufh;
  1997. !         while (kbufp != NULL) {
  1998. !             kp = kbufp->d_next;
  1999. !             free((char *)kbufp);
  2000. !             kbufp = kp;
  2001.           }
  2002.   
  2003.           /* and reset all the kill buffer pointers */
  2004. !         kbufh = kbufp = NULL;
  2005. !         kskip = 0;
  2006. !         kused = KBLOCK;             
  2007.       }
  2008.   }
  2009.   
  2010.   /*
  2011.    * Insert a character to the kill buffer, allocating new chunks as needed.
  2012.    * Return TRUE if all is well, and FALSE on errors.
  2013. --- 845,890 ----
  2014.    * new kill context is being created. The kill buffer array is released, just
  2015.    * in case the buffer has grown to immense size. No errors.
  2016.    */
  2017. ! void kdelete()
  2018.   {
  2019.       KILL *kp;    /* ptr to scan kill buffer chunk list */
  2020.   
  2021. !     if (kbufh[kill_index] != NULL) {
  2022.   
  2023.           /* first, delete all the chunks */
  2024. !         kbufp[kill_index] = kbufh[kill_index];
  2025. !         while (kbufp[kill_index] != NULL) {
  2026. !             kp = kbufp[kill_index]->d_next;
  2027. !             free((char *)kbufp[kill_index]);
  2028. !             kbufp[kill_index] = kp;
  2029.           }
  2030.   
  2031.           /* and reset all the kill buffer pointers */
  2032. !         kbufh[kill_index] = kbufp[kill_index] = NULL;
  2033. !         kskip[kill_index] = 0;
  2034. !         kused[kill_index] = KBLOCK;             
  2035.       }
  2036.   }
  2037.   
  2038. + /*    next_kill:    advance to the next position in the kill ring,
  2039. +             pushing the current kill buffer and clearing
  2040. +             what will be the new kill buffer
  2041. + */
  2042. + PASCAL NEAR next_kill()
  2043. + {
  2044. +     /* advance to the next kill ring entry */
  2045. +     kill_index++;
  2046. +     if (kill_index == NRING)
  2047. +         kill_index = 0;
  2048. +     /* and clear it, so it is ready for use */
  2049. +     kdelete();
  2050. + }
  2051.   /*
  2052.    * Insert a character to the kill buffer, allocating new chunks as needed.
  2053.    * Return TRUE if all is well, and FALSE on errors.
  2054. ***************
  2055. *** 884,924 ****
  2056.       if (direct == FORWARD) {
  2057.   
  2058.           /* check to see if we need a new chunk */
  2059. !         if (kused >= KBLOCK) {
  2060.               if ((nchunk = (KILL *)malloc(sizeof(KILL))) == NULL)
  2061.                   return(FALSE);
  2062. !             if (kbufh == NULL)    /* set head ptr if first time */
  2063. !                 kbufh = nchunk;
  2064. !             if (kbufp != NULL)    /* point the current to this new one */
  2065. !                 kbufp->d_next = nchunk;
  2066. !             kbufp = nchunk;
  2067. !             kbufp->d_next = NULL;
  2068. !             kused = 0;
  2069.           }
  2070.       
  2071.           /* and now insert the character */
  2072. !         kbufp->d_chunk[kused++] = c;
  2073.       } else {
  2074.           /* BACKWARDS */
  2075.           /* check to see if we need a new chunk */
  2076. !         if (kskip == 0) {
  2077.               if ((nchunk = (KILL *)malloc(sizeof(KILL))) == NULL)
  2078.                   return(FALSE);
  2079. !             if (kbufh == NULL) {    /* set head ptr if first time */
  2080. !                 kbufh = nchunk;
  2081. !                 kbufp = nchunk;
  2082. !                 kskip = KBLOCK;
  2083. !                 kused = KBLOCK;
  2084.                   nchunk->d_next = (KILL *)NULL;
  2085.               } else {
  2086. !                 nchunk->d_next = kbufh;
  2087. !                 kbufh = nchunk;
  2088. !                 kskip = KBLOCK;
  2089.               }
  2090.           }
  2091.       
  2092.           /* and now insert the character */
  2093. !         kbufh->d_chunk[--kskip] = c;
  2094.       }
  2095.       return(TRUE);
  2096.   }
  2097. --- 905,945 ----
  2098.       if (direct == FORWARD) {
  2099.   
  2100.           /* check to see if we need a new chunk */
  2101. !         if (kused[kill_index] >= KBLOCK) {
  2102.               if ((nchunk = (KILL *)malloc(sizeof(KILL))) == NULL)
  2103.                   return(FALSE);
  2104. !             if (kbufh[kill_index] == NULL)    /* set head ptr if first time */
  2105. !                 kbufh[kill_index] = nchunk;
  2106. !             if (kbufp[kill_index] != NULL)    /* point the current to this new one */
  2107. !                 kbufp[kill_index]->d_next = nchunk;
  2108. !             kbufp[kill_index] = nchunk;
  2109. !             kbufp[kill_index]->d_next = NULL;
  2110. !             kused[kill_index] = 0;
  2111.           }
  2112.       
  2113.           /* and now insert the character */
  2114. !         kbufp[kill_index]->d_chunk[kused[kill_index]++] = c;
  2115.       } else {
  2116.           /* BACKWARDS */
  2117.           /* check to see if we need a new chunk */
  2118. !         if (kskip[kill_index] == 0) {
  2119.               if ((nchunk = (KILL *)malloc(sizeof(KILL))) == NULL)
  2120.                   return(FALSE);
  2121. !             if (kbufh[kill_index] == NULL) {    /* set head ptr if first time */
  2122. !                 kbufh[kill_index] = nchunk;
  2123. !                 kbufp[kill_index] = nchunk;
  2124. !                 kskip[kill_index] = KBLOCK;
  2125. !                 kused[kill_index] = KBLOCK;
  2126.                   nchunk->d_next = (KILL *)NULL;
  2127.               } else {
  2128. !                 nchunk->d_next = kbufh[kill_index];
  2129. !                 kbufh[kill_index] = nchunk;
  2130. !                 kskip[kill_index] = KBLOCK;
  2131.               }
  2132.           }
  2133.       
  2134.           /* and now insert the character */
  2135. !         kbufh[kill_index]->d_chunk[--kskip[kill_index]] = c;
  2136.       }
  2137.       return(TRUE);
  2138.   }
  2139. ***************
  2140. *** 946,954 ****
  2141.           return(rdonly());    /* we are in read only mode    */
  2142.       if (n < 0)
  2143.           return(FALSE);
  2144.       /* make sure there is something to yank */
  2145. !     if (kbufh == NULL)
  2146.           return(TRUE);        /* not an error, just nothing */
  2147.   
  2148.       /*
  2149.        * Save the local pointers to hold global ".".
  2150. --- 967,978 ----
  2151.           return(rdonly());    /* we are in read only mode    */
  2152.       if (n < 0)
  2153.           return(FALSE);
  2154.       /* make sure there is something to yank */
  2155. !     if (kbufh[kill_index] == NULL) {
  2156. !         last_size = 0L;
  2157.           return(TRUE);        /* not an error, just nothing */
  2158. +     }
  2159.   
  2160.       /*
  2161.        * Save the local pointers to hold global ".".
  2162. ***************
  2163. *** 964,995 ****
  2164.   
  2165.       /* for each time.... */
  2166.       while (n--) {
  2167. !         if (kskip > 0) {
  2168. !             kptr = kbufh;
  2169. !             sp = &(kptr->d_chunk[kskip]);
  2170. !             counter = kskip;
  2171.               while (counter++ < KBLOCK) {
  2172.                   Char_insert(*sp);
  2173.                   ++sp;
  2174.               }
  2175.               kptr = kptr->d_next;
  2176.           } else {
  2177. !             kptr = kbufh;
  2178.           }
  2179.       
  2180.           if (kptr != (KILL *)NULL) {
  2181. !             while (kptr != kbufp) {
  2182.                   sp = kptr->d_chunk;
  2183.                   for(counter = 0; counter < KBLOCK; counter++) {
  2184.                       Char_insert(*sp);
  2185.                       ++sp;
  2186.                   }
  2187.                   kptr = kptr->d_next;
  2188.               }
  2189. !             counter = kused;
  2190.               sp = kptr->d_chunk;
  2191.               while (counter--) {
  2192.                   Char_insert(*sp);
  2193.                   ++sp;
  2194.               }
  2195.           }
  2196. --- 988,1023 ----
  2197.   
  2198.       /* for each time.... */
  2199.       while (n--) {
  2200. !         last_size = 0L;
  2201. !         if (kskip[kill_index] > 0) {
  2202. !             kptr = kbufh[kill_index];
  2203. !             sp = &(kptr->d_chunk[kskip[kill_index]]);
  2204. !             counter = kskip[kill_index];
  2205.               while (counter++ < KBLOCK) {
  2206.                   Char_insert(*sp);
  2207. +                 last_size++;
  2208.                   ++sp;
  2209.               }
  2210.               kptr = kptr->d_next;
  2211.           } else {
  2212. !             kptr = kbufh[kill_index];
  2213.           }
  2214.       
  2215.           if (kptr != (KILL *)NULL) {
  2216. !             while (kptr != kbufp[kill_index]) {
  2217.                   sp = kptr->d_chunk;
  2218.                   for(counter = 0; counter < KBLOCK; counter++) {
  2219.                       Char_insert(*sp);
  2220. +                     last_size++;
  2221.                       ++sp;
  2222.                   }
  2223.                   kptr = kptr->d_next;
  2224.               }
  2225. !             counter = kused[kill_index];
  2226.               sp = kptr->d_chunk;
  2227.               while (counter--) {
  2228.                   Char_insert(*sp);
  2229. +                 last_size++;
  2230.                   ++sp;
  2231.               }
  2232.           }
  2233. ***************
  2234. *** 1002,1007 ****
  2235. --- 1030,1094 ----
  2236.           curwp->w_dotp = lforw(curline);
  2237.           curwp->w_doto = curoff;
  2238.       }
  2239. +     thisflag |= CFYANK;
  2240. +     return(TRUE);
  2241. + }
  2242. + PASCAL NEAR cycle_ring(f, n)
  2243. + int f,n;    /* prefix flag and argument */
  2244. + {
  2245. +     register int orig_index;    /* original kill_index */
  2246. +     /* if there is an argument, cycle the kill index */
  2247. +     if (f) {
  2248. +         while (n) {
  2249. +             orig_index = kill_index;
  2250. +             do {
  2251. +                 kill_index--;
  2252. +                 if (kill_index < 0)
  2253. +                     kill_index = NRING - 1;
  2254. +             } while ((orig_index != kill_index) &&
  2255. +                 (kbufh[kill_index] == (KILL *)NULL));
  2256. +             n--;
  2257. +         }
  2258. +     }
  2259. + }
  2260. + PASCAL NEAR yank_pop(f, n)
  2261. + int f,n;    /* prefix flag and argument */
  2262. + {
  2263. +     /* defaulted non first call will cycle by 1 */
  2264. +     if ((lastflag & CFYANK) && (f == FALSE)) {
  2265. +         f = TRUE;
  2266. +         n = 1;
  2267. +     }
  2268. +     /* cycle the kill ring appropriately */
  2269. +     cycle_ring(f, n);
  2270. +     /* if not the first consectutive time, delete the last yank */
  2271. +     if ((lastflag & CFYANK))
  2272. +         ldelete(-last_size, FALSE);
  2273. +     /* and insert the current kill buffer */
  2274. +     return(yank(FALSE, 1));
  2275. + }
  2276. + PASCAL NEAR clear_ring(f, n)
  2277. + int f,n;    /* prefix flag and argument */
  2278. + {
  2279. +     register int index;
  2280. +     for (index = 0; index < NRING; index++)
  2281. +         next_kill();
  2282. +     mlwrite(TEXT228);
  2283. + /*        "[Kill ring cleared]" */
  2284.       return(TRUE);
  2285.   }
  2286.   
  2287. ***************
  2288. *** 1014,1030 ****
  2289.       char *sp;
  2290.       int counter;
  2291.   
  2292. !     if (kbufh == (KILL *)NULL) {
  2293.           printf("<EMPTY>\n");
  2294.           return;
  2295.       }
  2296.   
  2297.       index = 1;
  2298. !     if (kskip > 0) {
  2299. !         kptr = kbufh;
  2300. !         printf("kskip = %d\nBLOCK %d <", kskip, index++);
  2301. !         sp = &(kptr->d_chunk[kskip]);
  2302. !         counter = kskip;
  2303.           while (counter++ < KBLOCK) {
  2304.               putchar(*sp++);
  2305.           }
  2306. --- 1101,1117 ----
  2307.       char *sp;
  2308.       int counter;
  2309.   
  2310. !     if (kbufh[kill_index] == (KILL *)NULL) {
  2311.           printf("<EMPTY>\n");
  2312.           return;
  2313.       }
  2314.   
  2315.       index = 1;
  2316. !     if (kskip[kill_index] > 0) {
  2317. !         kptr = kbufh[kill_index];
  2318. !         printf("kskip[kill_index] = %d\nBLOCK %d <", kskip[kill_index], index++);
  2319. !         sp = &(kptr->d_chunk[kskip[kill_index]]);
  2320. !         counter = kskip[kill_index];
  2321.           while (counter++ < KBLOCK) {
  2322.               putchar(*sp++);
  2323.           }
  2324. ***************
  2325. *** 1031,1051 ****
  2326.           printf(">\n");
  2327.           kptr = kptr->d_next;
  2328.       } else {
  2329. !         kptr = kbufh;
  2330.       }
  2331.   
  2332.       if (kptr != (KILL *)NULL) {
  2333. !         while (kptr != kbufp) {
  2334.               printf("BLOCK %d <%255s>\n", index++, kptr->d_chunk);
  2335.               kptr = kptr->d_next;
  2336.           }
  2337.           printf("BLOCK %d <", index++);
  2338. !         counter = kused;
  2339.           sp = kptr->d_chunk;
  2340.           while (counter--) {
  2341.               putchar(*sp++);
  2342.           }
  2343. !         printf(">\nkused = %d\n", kused);
  2344.       }
  2345.   
  2346.   }
  2347. --- 1118,1138 ----
  2348.           printf(">\n");
  2349.           kptr = kptr->d_next;
  2350.       } else {
  2351. !         kptr = kbufh[kill_index];
  2352.       }
  2353.   
  2354.       if (kptr != (KILL *)NULL) {
  2355. !         while (kptr != kbufp[kill_index]) {
  2356.               printf("BLOCK %d <%255s>\n", index++, kptr->d_chunk);
  2357.               kptr = kptr->d_next;
  2358.           }
  2359.           printf("BLOCK %d <", index++);
  2360. !         counter = kused[kill_index];
  2361.           sp = kptr->d_chunk;
  2362.           while (counter--) {
  2363.               putchar(*sp++);
  2364.           }
  2365. !         printf(">\nkused[kill_index] = %d\n", kused[kill_index]);
  2366.       }
  2367.   
  2368.   }
  2369. *** ../orig/main.c    Mon Jul 27 21:51:53 1992
  2370. --- main.c    Mon Jul 27 21:54:53 1992
  2371. ***************
  2372. *** 27,32 ****
  2373. --- 27,36 ----
  2374.   
  2375.   /* for many different systems, increase the default stack space */
  2376.   
  2377. + #if    MSDOS && MSC
  2378. + unsigned _stackavail = 20000;
  2379. + #endif
  2380.   #if    MSDOS && LATTICE
  2381.   unsigned _stack = 20000;
  2382.   #endif
  2383. ***************
  2384. *** 149,156 ****
  2385.           bp = bheadp;
  2386.       }
  2387.   
  2388. !     /* and the kill buffer */
  2389. !     kdelete();
  2390.   
  2391.       /* clear some search variables */
  2392.   #if    MAGIC
  2393. --- 153,160 ----
  2394.           bp = bheadp;
  2395.       }
  2396.   
  2397. !     /* and the kill buffers */
  2398. !     clear_ring();
  2399.   
  2400.       /* clear some search variables */
  2401.   #if    MAGIC
  2402. ***************
  2403. *** 374,379 ****
  2404. --- 378,384 ----
  2405.       register int mflag;    /* negative flag on repeat */
  2406.       register int basec;    /* c stripped of meta character */
  2407.       register int oldflag;    /* old last flag value */
  2408. +     char time[6];        /* current display time */
  2409.   
  2410.       /* setup to process commands */
  2411.       lastflag = 0;        /* Fake last flags.    */
  2412. ***************
  2413. *** 407,412 ****
  2414. --- 412,428 ----
  2415.       }
  2416.   #endif
  2417.   
  2418. +     /* update time on the bottom modeline? */
  2419. +     if (timeflag) {
  2420. +         getdtime(time);
  2421. +         if (strcmp(lasttime, time) != 0)
  2422. +             upmode();
  2423. +     }
  2424. +     /* update position on current modeline? */
  2425. +     if (posflag)
  2426. +         upmode();
  2427.       /* Fix up the screen    */
  2428.       update(FALSE);
  2429.   
  2430. ***************
  2431. *** 526,531 ****
  2432. --- 542,557 ----
  2433.   
  2434.   {
  2435.       register BUFFER *bp;
  2436. +     register int index;
  2437. +     /* init the kill ring */
  2438. +     for (index = 0; index < NRING; index++) {
  2439. +         kbufp[index] = (KILL *)NULL;
  2440. +         kbufh[index] = (KILL *)NULL;
  2441. +         kskip[index] = 0;
  2442. +         kused[index] = KBLOCK;
  2443. +     }
  2444. +     kill_index = 0;
  2445.   
  2446.       /* initialize some important globals */
  2447.   
  2448. ***************
  2449. *** 544,550 ****
  2450.   
  2451.       /* allocate the first buffer */
  2452.       bp = bfind(bname, TRUE, 0);        /* First buffer     */
  2453. !     blistp = bfind("[List]", TRUE, BFINVS); /* Buffer list buffer    */
  2454.       slistp = bfind("[Screens]", TRUE, BFINVS); /* Buffer list buffer    */
  2455.       if (bp==NULL || blistp==NULL)
  2456.           meexit(1);
  2457. --- 570,576 ----
  2458.   
  2459.       /* allocate the first buffer */
  2460.       bp = bfind(bname, TRUE, 0);        /* First buffer     */
  2461. !     blistp = bfind("[Buffers]", TRUE, BFINVS); /* Buffer list buffer    */
  2462.       slistp = bfind("[Screens]", TRUE, BFINVS); /* Buffer list buffer    */
  2463.       if (bp==NULL || blistp==NULL)
  2464.           meexit(1);
  2465. *** ../orig/platin.h    Mon Jul 27 21:51:54 1992
  2466. --- platin.h    Mon Jul 27 21:55:44 1992
  2467. ***************
  2468. *** 232,235 ****
  2469. --- 232,236 ----
  2470.   #define    TEXT225 "[Switched to screen %s]"
  2471.   #define    TEXT226    "%%Can not kill an executing buffer"
  2472.   #define    TEXT227 "\n--- Press any key to Continue ---"
  2473. + #define TEXT228 "[Illkay ingray earedclay]"
  2474.   
  2475. *** ../orig/random.c    Mon Jul 27 21:51:55 1992
  2476. --- random.c    Mon Jul 27 21:54:56 1992
  2477. ***************
  2478. *** 745,751 ****
  2479.                   return(backdel(f, -n));
  2480.           if (f != FALSE) {                       /* Really a kill.       */
  2481.                   if ((lastflag&CFKILL) == 0)
  2482. !                         kdelete();
  2483.                   thisflag |= CFKILL;
  2484.           }
  2485.           return(ldelete((long)n, f));
  2486. --- 745,751 ----
  2487.                   return(backdel(f, -n));
  2488.           if (f != FALSE) {                       /* Really a kill.       */
  2489.                   if ((lastflag&CFKILL) == 0)
  2490. !                         next_kill();
  2491.                   thisflag |= CFKILL;
  2492.           }
  2493.           return(ldelete((long)n, f));
  2494. ***************
  2495. *** 770,776 ****
  2496.                   return(forwdel(f, -n));
  2497.           if (f != FALSE) {                       /* Really a kill.       */
  2498.                   if ((lastflag&CFKILL) == 0)
  2499. !                         kdelete();
  2500.                   thisflag |= CFKILL;
  2501.           }
  2502.           if ((s=backchar(f, n)) == TRUE)
  2503. --- 770,776 ----
  2504.                   return(forwdel(f, -n));
  2505.           if (f != FALSE) {                       /* Really a kill.       */
  2506.                   if ((lastflag&CFKILL) == 0)
  2507. !                         next_kill();
  2508.                   thisflag |= CFKILL;
  2509.           }
  2510.           if ((s=backchar(f, n)) == TRUE)
  2511. ***************
  2512. *** 797,803 ****
  2513.       if (curbp->b_mode&MDVIEW)    /* don't allow this command if    */
  2514.           return(rdonly());    /* we are in read only mode    */
  2515.           if ((lastflag&CFKILL) == 0)             /* Clear kill buffer if */
  2516. !                 kdelete();                      /* last wasn't a kill.  */
  2517.           thisflag |= CFKILL;
  2518.   
  2519.           if (f == FALSE) {
  2520. --- 797,803 ----
  2521.       if (curbp->b_mode&MDVIEW)    /* don't allow this command if    */
  2522.           return(rdonly());    /* we are in read only mode    */
  2523.           if ((lastflag&CFKILL) == 0)             /* Clear kill buffer if */
  2524. !                 next_kill();            /* last wasn't a kill.  */
  2525.           thisflag |= CFKILL;
  2526.   
  2527.           if (f == FALSE) {
  2528. *** ../orig/region.c    Mon Jul 27 21:51:55 1992
  2529. --- region.c    Mon Jul 27 21:54:57 1992
  2530. ***************
  2531. *** 64,70 ****
  2532.           if ((s=getregion(®ion)) != TRUE)
  2533.                   return(s);
  2534.           if ((lastflag&CFKILL) == 0)             /* This is a kill type  */
  2535. !                 kdelete();                      /* command, so do magic */
  2536.           thisflag |= CFKILL;                     /* kill buffer stuff.   */
  2537.           curwp->w_dotp = region.r_linep;
  2538.           curwp->w_doto = region.r_offset;
  2539. --- 64,70 ----
  2540.           if ((s=getregion(®ion)) != TRUE)
  2541.                   return(s);
  2542.           if ((lastflag&CFKILL) == 0)             /* This is a kill type  */
  2543. !                 next_kill();                      /* command, so do magic */
  2544.           thisflag |= CFKILL;                     /* kill buffer stuff.   */
  2545.           curwp->w_dotp = region.r_linep;
  2546.           curwp->w_doto = region.r_offset;
  2547. ***************
  2548. *** 90,96 ****
  2549.           if ((s=getregion(®ion)) != TRUE)
  2550.                   return(s);
  2551.           if ((lastflag&CFKILL) == 0)             /* Kill type command.   */
  2552. !                 kdelete();
  2553.           thisflag |= CFKILL;
  2554.           linep = region.r_linep;                 /* Current line.        */
  2555.           loffs = region.r_offset;                /* Current offset.      */
  2556. --- 90,96 ----
  2557.           if ((s=getregion(®ion)) != TRUE)
  2558.                   return(s);
  2559.           if ((lastflag&CFKILL) == 0)             /* Kill type command.   */
  2560. !                 next_kill();
  2561.           thisflag |= CFKILL;
  2562.           linep = region.r_linep;                 /* Current line.        */
  2563.           loffs = region.r_offset;                /* Current offset.      */
  2564. *** ../orig/search.c    Mon Jul 27 21:51:56 1992
  2565. --- search.c    Mon Jul 27 21:55:00 1992
  2566. ***************
  2567. *** 12,23 ****
  2568.   #include "edef.h"
  2569.   #include "elang.h"
  2570.   
  2571. - /* The variables matchline and matchoff hold the line
  2572. -  * and offset position of the *start* of the match.
  2573. -  */
  2574. - static int    matchlen;
  2575. - static int    matchoff;
  2576. - static LINE    *matchline;
  2577.   static int    patlenadd;
  2578.   static int    lastchfjump, lastchbjump;
  2579.   static int    deltaf[HICHAR], deltab[HICHAR];
  2580. --- 12,17 ----
  2581. ***************
  2582. *** 366,383 ****
  2583.               }
  2584.           }
  2585.           else if (mcptr->mc_type == GRPBEG) {
  2586. !             if (direct == FORWARD) {
  2587. !                 group_reg[mcptr->u.group_no].r_offset = curoff;
  2588. !                 group_reg[mcptr->u.group_no].r_linep = curline;
  2589. !             }
  2590. !             group_reg[mcptr->u.group_no].r_size = -matchlen;
  2591.           }
  2592.           else if (mcptr->mc_type == GRPEND) {
  2593. !             if (direct == REVERSE) {
  2594. !                 group_reg[mcptr->u.group_no].r_offset = curoff;
  2595. !                 group_reg[mcptr->u.group_no].r_linep = curline;
  2596. !             }
  2597. !             group_len[mcptr->u.group_no] = matchlen;
  2598.           }
  2599.           else if (mcptr->mc_type == BOL) {
  2600.               if (curoff != 0)
  2601. --- 360,371 ----
  2602.               }
  2603.           }
  2604.           else if (mcptr->mc_type == GRPBEG) {
  2605. !             group_reg[mcptr->u.group_no].r_offset = curoff;
  2606. !             group_reg[mcptr->u.group_no].r_linep = curline;
  2607. !             group_reg[mcptr->u.group_no].r_size = (direct == FORWARD)? -matchlen: matchlen;
  2608.           }
  2609.           else if (mcptr->mc_type == GRPEND) {
  2610. !             group_len[mcptr->u.group_no] = (direct == FORWARD)? matchlen: -matchlen;
  2611.           }
  2612.           else if (mcptr->mc_type == BOL) {
  2613.               if (curoff != 0)
  2614. ***************
  2615. *** 543,549 ****
  2616.       curline = *pcurline;
  2617.       curoff = *pcuroff;
  2618.   
  2619. !     if (dir == FORWARD) {
  2620.           while (jump != 0) {
  2621.               curoff += jump;
  2622.               spare = curoff - llength(curline);
  2623. --- 531,538 ----
  2624.       curline = *pcurline;
  2625.       curoff = *pcuroff;
  2626.   
  2627. !     if (dir == FORWARD)
  2628. !     {
  2629.           while (jump != 0) {
  2630.               curoff += jump;
  2631.               spare = curoff - llength(curline);
  2632. ***************
  2633. *** 722,728 ****
  2634.       char        tpat[NPAT+20];
  2635.   
  2636.       strcpy(tpat, prompt);    /* copy prompt to output string */
  2637. !     strcat(tpat, " [");    /* build new prompt string */
  2638.       expandp(&apat[0], &tpat[strlen(tpat)], NPAT/2);    /* add old pattern */
  2639.       strcat(tpat, "]");
  2640.   
  2641. --- 711,717 ----
  2642.       char        tpat[NPAT+20];
  2643.   
  2644.       strcpy(tpat, prompt);    /* copy prompt to output string */
  2645. !     strcat(tpat, " [");
  2646.       expandp(&apat[0], &tpat[strlen(tpat)], NPAT/2);    /* add old pattern */
  2647.       strcat(tpat, "]");
  2648.   
  2649. ***************
  2650. *** 739,745 ****
  2651.   
  2652.       /* Read a pattern.  Either we get one,
  2653.        * or we just get the META charater, and use the previous pattern.
  2654. !      * Then, if it's the search string, make a reversed pattern.
  2655.        * *Then*, make the meta-pattern, if we are defined that way.
  2656.        */
  2657.       if ((status = mltreply(tpat, tpat, NPAT, sterm)) == TRUE) {
  2658. --- 728,734 ----
  2659.   
  2660.       /* Read a pattern.  Either we get one,
  2661.        * or we just get the META charater, and use the previous pattern.
  2662. !      * Then, if it's the search string, create the delta tables.
  2663.        * *Then*, make the meta-pattern, if we are defined that way.
  2664.        */
  2665.       if ((status = mltreply(tpat, tpat, NPAT, sterm)) == TRUE) {
  2666. ***************
  2667. *** 746,754 ****
  2668.           lastflag &= ~CFSRCH;
  2669.           strcpy(apat, tpat);
  2670.   
  2671. -         /* If we are doing the search string,
  2672. -          * set the delta tables.
  2673. -          */
  2674.           if (srch)
  2675.               setjtable();
  2676.   
  2677. --- 735,740 ----
  2678. ***************
  2679. *** 791,812 ****
  2680.       tmpreg.r_offset = matchoff;
  2681.       tmpreg.r_linep = matchline;
  2682.       tmpreg.r_size = matchlen;
  2683. -     regtostr(patmatch, &tmpreg);
  2684.   
  2685. ! #if    MAGIC
  2686.       /*
  2687.        * Save the groups.
  2688.        */
  2689. !     grpmatch[0] = patmatch;
  2690. !     for (j = 1; j <= group_count; j++) {
  2691.           group_reg[j].r_size += group_len[j];
  2692. !         if (grpmatch[j] != NULL) {
  2693.               free(grpmatch[j]);
  2694. -         }
  2695.   
  2696. !         if ((grpmatch[j] = malloc(group_reg[j].r_size + 1)) != NULL) {
  2697.               regtostr(grpmatch[j], &group_reg[j]);
  2698. !         } else {
  2699.               mlwrite(TEXT94);
  2700.   /*            "%%Out of memory" */
  2701.               return ABORT;
  2702. --- 777,800 ----
  2703.       tmpreg.r_offset = matchoff;
  2704.       tmpreg.r_linep = matchline;
  2705.       tmpreg.r_size = matchlen;
  2706.   
  2707. ! #if    MAGIC == 0
  2708. !     regtostr(patmatch, &tmpreg);
  2709. ! #else
  2710.       /*
  2711.        * Save the groups.
  2712.        */
  2713. !     grpmatch[0] = regtostr(patmatch, &tmpreg);
  2714. !     for (j = 1; j <= group_count; j++)
  2715. !     {
  2716.           group_reg[j].r_size += group_len[j];
  2717. !         if (grpmatch[j] != NULL)
  2718.               free(grpmatch[j]);
  2719.   
  2720. !         if ((grpmatch[j] = malloc(group_reg[j].r_size + 1)) != NULL)
  2721.               regtostr(grpmatch[j], &group_reg[j]);
  2722. !         else {
  2723.               mlwrite(TEXT94);
  2724.   /*            "%%Out of memory" */
  2725.               return ABORT;
  2726. ***************
  2727. *** 1026,1032 ****
  2728.           /* if this is the point origin, flag so we a can reset it */
  2729.           if (curwp->w_dotp == origline) {
  2730.               origline = NULL;
  2731. !             lastline = curwp->w_dotp->l_bp;
  2732.           }
  2733.   
  2734.           /* Delete the sucker, and insert its
  2735. --- 1014,1020 ----
  2736.           /* if this is the point origin, flag so we a can reset it */
  2737.           if (curwp->w_dotp == origline) {
  2738.               origline = NULL;
  2739. !             lastline = lback(curwp->w_dotp);
  2740.           }
  2741.   
  2742.           /* Delete the sucker, and insert its
  2743. ***************
  2744. *** 1038,1044 ****
  2745.           status = delins(matchlen, &rpat[0], FALSE);
  2746.   #endif
  2747.           if (origline == NULL) {
  2748. !             origline = lastline->l_fp;
  2749.               origoff = 0;
  2750.           }
  2751.   
  2752. --- 1026,1032 ----
  2753.           status = delins(matchlen, &rpat[0], FALSE);
  2754.   #endif
  2755.           if (origline == NULL) {
  2756. !             origline = lforw(lastline);
  2757.               origoff = 0;
  2758.           }
  2759.   
  2760. ***************
  2761. *** 1430,1437 ****
  2762.   #else
  2763.               *rtpcm = *--mcptr;
  2764.   #endif
  2765. -             if (rtpcm->mc_type & (GRPBEG | GRPEND))
  2766. -                 rtpcm->mc_type ^= (GRPBEG | GRPEND);
  2767.               rtpcm++;
  2768.           }
  2769.           rtpcm->mc_type = MCNIL;
  2770. --- 1418,1423 ----
  2771. *** ../orig/spanish.h    Mon Jul 27 21:51:56 1992
  2772. --- spanish.h    Mon Jul 27 21:55:44 1992
  2773. ***************
  2774. *** 232,235 ****
  2775. --- 232,236 ----
  2776.   #define    TEXT225 "[Switched to screen %s]"
  2777.   #define    TEXT226    "%%Can not kill an executing buffer"
  2778.   #define    TEXT227 "\n--- Press any key to Continue ---"
  2779. + #define TEXT228 "[Kill ring cleared]"
  2780.   
  2781. *** ../orig/unix.c    Mon Jul 27 21:51:58 1992
  2782. --- unix.c    Mon Jul 27 22:09:01 1992
  2783. ***************
  2784. *** 91,96 ****
  2785. --- 91,99 ----
  2786.   /** Overall include files **/
  2787.   #include <sys/types.h>            /* System type definitions    */
  2788.   #include <sys/stat.h>            /* File status definitions    */
  2789. + #if PC_BSD
  2790. + #include <sys/ioctl_compat.h>
  2791. + #endif /* PC_BSD */
  2792.   #include <sys/ioctl.h>            /* I/O control definitions    */
  2793.   
  2794.   /** Additional include files **/
  2795. ***************
  2796. *** 117,127 ****
  2797.   #include <sys/dir.h>            /* Directory entry definitions    */
  2798.   #define DIRENTRY    direct
  2799.   #endif /* BSD */
  2800. ! #if XENIX
  2801.   #include <sys/ndir.h>            /* Directory entry definitions    */
  2802.   #define DIRENTRY    direct
  2803.   #endif /* XENIX */
  2804. ! #if USG || SMOS || HPUX || SUN || AVIION
  2805.   #include <dirent.h>            /* Directory entry definitions    */
  2806.   #define DIRENTRY    dirent
  2807.   #endif /* USG || SMOS || HPUX || SUN || AVIION */
  2808. --- 120,130 ----
  2809.   #include <sys/dir.h>            /* Directory entry definitions    */
  2810.   #define DIRENTRY    direct
  2811.   #endif /* BSD */
  2812. ! #if XENIX || VAT
  2813.   #include <sys/ndir.h>            /* Directory entry definitions    */
  2814.   #define DIRENTRY    direct
  2815.   #endif /* XENIX */
  2816. ! #if (USG && !VAT) || SMOS || HPUX || SUN || AVIION
  2817.   #include <dirent.h>            /* Directory entry definitions    */
  2818.   #define DIRENTRY    dirent
  2819.   #endif /* USG || SMOS || HPUX || SUN || AVIION */
  2820. ***************
  2821. *** 160,165 ****
  2822. --- 163,169 ----
  2823.       char * name;            /* Termcap name            */
  2824.       int value;            /* Binding value        */
  2825.   };
  2826. + char *reset = (char*) NULL;        /* reset string kjc */
  2827.   #endif /* TERMCAP */
  2828.   
  2829.   /** Local variables **/
  2830. ***************
  2831. *** 253,258 ****
  2832. --- 257,263 ----
  2833.       { "k8", SPEC|'8' },        /* F8 key            */
  2834.       { "k9", SPEC|'9' },        /* F9 key            */
  2835.       { "k0", SPEC|'0' },        /* F0 or F10 key        */
  2836. +      { "k;", SPEC|'0' },        /* F0 or F10 key    (kjc)    */
  2837.       { "kA", CTRL|'O' },        /* Insert line key        */
  2838.       { "kb", CTRL|'H' },        /* Backspace key        */
  2839.       { "kC", CTRL|'L' },        /* Clear screen key        */
  2840. ***************
  2841. *** 261,266 ****
  2842. --- 266,272 ----
  2843.       { "kE", CTRL|'K' },        /* Clear to end of line key    */
  2844.       { "kF", CTRL|'V' },        /* Scroll forward key        */
  2845.       { "kH", SPEC|'>' },        /* Home down key        */
  2846. +      { "@7", SPEC|'>' },        /* Home down key    (kjc)    */
  2847.       { "kh", SPEC|'<' },        /* Home key            */
  2848.       { "kI", SPEC|'C' },        /* Insert character key        */
  2849.       { "kL", CTRL|'K' },        /* Delete line key        */
  2850. ***************
  2851. *** 304,309 ****
  2852. --- 310,316 ----
  2853.       0,                /* Current number of columns    */
  2854.       MARGIN,                /* Margin for extending lines    */
  2855.       SCRSIZ,                /* Scroll size for extending    */
  2856. +     0, 0,                /* upper left corner default screen */
  2857.       NPAUSE,                /* # times thru update to pause    */
  2858.       scopen,                /* Open terminal routine    */
  2859.       scclose,            /* Close terminal routine    */
  2860. ***************
  2861. *** 315,320 ****
  2862. --- 322,328 ----
  2863.       scmove,                /* Move cursor routine        */
  2864.       sceeol,                /* Erase to end of line routine    */
  2865.       sceeop,                /* Erase to end of page routine    */
  2866. +     sceeop,                /* Clear the desktop        */
  2867.       scbeep,                /* Beep! routine        */
  2868.       screv,                /* Set reverse video routine    */
  2869.       scnothing,            /* Set resolution routine    */
  2870. ***************
  2871. *** 429,434 ****
  2872. --- 437,445 ----
  2873.   int ttclose()
  2874.   {
  2875.       /* Restore original terminal modes */
  2876. +     if (reset != (char*)NULL)
  2877. +         write(1, reset, strlen(reset));
  2878.   #if BSD
  2879.       if (ioctl(0, TIOCSETP, &oldsgtty) ||
  2880.           ioctl(0, TIOCSETC, &oldtchars) ||
  2881. ***************
  2882. *** 771,781 ****
  2883. --- 782,796 ----
  2884.           return(0);
  2885.       return(count);
  2886.   #else /* not FIONREAD */
  2887. + #ifdef VAT
  2888. +     return(0);
  2889. + #else /* not VAT */
  2890.       /* Ask hardware for count */
  2891.       count = ioctl(0, FIORDCHK, 0);
  2892.       if (count < 0)
  2893.           return(0);
  2894.       return(count);
  2895. + #endif    /* VAT */
  2896.   #endif /* FIONREAD */
  2897.   }
  2898.   #endif /* TYPEAH */
  2899. ***************
  2900. *** 804,810 ****
  2901.       struct keybind * kp;
  2902.   
  2903.       char * getenv(), * tgetstr();
  2904. ! #if HPUX
  2905.       /* HP-UX doesn't seem to have these in the termcap library */
  2906.       char PC, * UP;
  2907.       short ospeed;
  2908. --- 819,832 ----
  2909.       struct keybind * kp;
  2910.   
  2911.       char * getenv(), * tgetstr();
  2912. ! #ifndef VAT
  2913. ! #define TGETSTR(a,b)    tgetstr((a), (b))
  2914. ! #else
  2915. ! #define TGETSTR(a,b)    tgetstr((a), *(b))
  2916. ! #endif
  2917. ! #if HPUX || VAT
  2918.       /* HP-UX doesn't seem to have these in the termcap library */
  2919.       char PC, * UP;
  2920.       short ospeed;
  2921. ***************
  2922. *** 842,858 ****
  2923.       /* Start grabbing termcap commands */
  2924.       cp = tcapbuf;
  2925.   
  2926.       /* Get the pad character */
  2927.       if (tgetstr("pc", &cp))
  2928.           PC = tcapbuf[0];
  2929.   
  2930.       /* Get up line capability */
  2931. !     UP = tgetstr("up", &cp);
  2932.   
  2933.       /* Get other capabilities */
  2934.       cb = capbind;
  2935.       while (cb < &capbind[sizeof(capbind)/sizeof(*capbind)]) {
  2936. !         cb->store = tgetstr(cb->name, &cp);
  2937.           cb++;
  2938.       }
  2939.   
  2940. --- 864,883 ----
  2941.       /* Start grabbing termcap commands */
  2942.       cp = tcapbuf;
  2943.   
  2944. +     /* Get the reset string */
  2945. +     reset = TGETSTR("is", &cp);
  2946.       /* Get the pad character */
  2947.       if (tgetstr("pc", &cp))
  2948.           PC = tcapbuf[0];
  2949.   
  2950.       /* Get up line capability */
  2951. !     UP = TGETSTR("up", &cp);
  2952.   
  2953.       /* Get other capabilities */
  2954.       cb = capbind;
  2955.       while (cb < &capbind[sizeof(capbind)/sizeof(*capbind)]) {
  2956. !         cb->store = TGETSTR(cb->name, &cp);
  2957.           cb++;
  2958.       }
  2959.   
  2960. ***************
  2961. *** 871,877 ****
  2962.       /* Get keybindings */
  2963.       kp = keybind;
  2964.       while (kp < &keybind[sizeof(keybind)/sizeof(*keybind)]) {
  2965. !         addkey(tgetstr(kp->name, &cp), kp->value);
  2966.           kp++;
  2967.       }
  2968.   
  2969. --- 896,902 ----
  2970.       /* Get keybindings */
  2971.       kp = keybind;
  2972.       while (kp < &keybind[sizeof(keybind)/sizeof(*keybind)]) {
  2973. !         addkey(TGETSTR(kp->name, &cp), kp->value);
  2974.           kp++;
  2975.       }
  2976.   
  2977. ***************
  2978. *** 943,948 ****
  2979. --- 968,975 ----
  2980.   int row;                /* Row number            */
  2981.   int col;                /* Column number        */
  2982.   {
  2983. +     char *tgoto();
  2984.   #if TERMCAP
  2985.       /* Call on termcap to create move sequence */
  2986.       putpad(tgoto(capbind[CAP_CM].store, col, row));
  2987. *** ../orig/word.c    Mon Jul 27 21:51:59 1992
  2988. --- word.c    Mon Jul 27 21:55:05 1992
  2989. ***************
  2990. *** 292,298 ****
  2991.   
  2992.       /* Clear the kill buffer if last command wasn't a kill */
  2993.       if ((lastflag&CFKILL) == 0)
  2994. !         kdelete();
  2995.       thisflag |= CFKILL;    /* this command is a kill */
  2996.   
  2997.       /* save the current cursor position */
  2998. --- 292,298 ----
  2999.   
  3000.       /* Clear the kill buffer if last command wasn't a kill */
  3001.       if ((lastflag&CFKILL) == 0)
  3002. !         next_kill();
  3003.       thisflag |= CFKILL;    /* this command is a kill */
  3004.   
  3005.       /* save the current cursor position */
  3006. ***************
  3007. *** 381,387 ****
  3008.   
  3009.       /* Clear the kill buffer if last command wasn't a kill */
  3010.       if ((lastflag&CFKILL) == 0)
  3011. !         kdelete();
  3012.       thisflag |= CFKILL;    /* this command is a kill */
  3013.   
  3014.       if (backchar(FALSE, 1) == FALSE)
  3015. --- 381,387 ----
  3016.   
  3017.       /* Clear the kill buffer if last command wasn't a kill */
  3018.       if ((lastflag&CFKILL) == 0)
  3019. !         next_kill();
  3020.       thisflag |= CFKILL;    /* this command is a kill */
  3021.   
  3022.       if (backchar(FALSE, 1) == FALSE)
  3023. ***************
  3024. *** 484,491 ****
  3025.           lp = lp->l_fp;
  3026.       }
  3027.   
  3028.       /* create a buffer to hold this stuff */
  3029. !     para = malloc(psize + 100);    /***** THIS IS TEMP *****/
  3030.       if (para == NULL) {
  3031.           mlwrite(TEXT94);
  3032.   /*                      "%%Out of memory" */
  3033. --- 484,495 ----
  3034.           lp = lp->l_fp;
  3035.       }
  3036.   
  3037. +     /* must have size! */
  3038. +     if (psize == 0)
  3039. +         return(TRUE);
  3040.       /* create a buffer to hold this stuff */
  3041. !     para = malloc(psize + 10);    /* this prabably could be + 1 */
  3042.       if (para == NULL) {
  3043.           mlwrite(TEXT94);
  3044.   /*                      "%%Out of memory" */
  3045.